Boost logo

Boost :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2020-03-26 12:27:44


On Thu, 26 Mar 2020 at 13:02, Mike via Boost <boost_at_[hidden]> wrote:
>
> > Gesendet: Donnerstag, 26. März 2020 um 12:25 Uhr
> > Von: "Mateusz Loskot via Boost" <boost_at_[hidden]>
> >
> > On Thu, 26 Mar 2020 at 11:54, Alexander Grund via Boost
> > <boost_at_[hidden]> wrote:
> > > >> Ok, then I have to require MSVC 2015 which is fine to me.
> > > >> How would I tell the test matrix about this?
> > > > By specifying cxx11 features as required in test/Jamfile
> > > >
> > > > For example:
> > > > https://github.com/boostorg/mp11/blob/develop/test/Jamfile#L15
> > > > https://github.com/boostorg/gil/blob/develop/test/Jamfile#L57-L63
> > >
> > > The feature I require does not yet exist. I need movable std streams
> > > which MSVC supports since 2015 but 2013 does support most (many) C++11
> > > features already.
> >
> > Listing any cxx_* features which are not supported by VS 2013
> > should allow to filter 2013 and let the matix skip the builds.
>
> That seems excessively indirect. Isn't it possible to just say "if msvc, requires msvc > 14.0" ?

Certainly, a compiler-specific filtering can be scripted in Boost.Jam.

Here is a possible solution

project
  : requirements
    <conditional>@disable-old-compiler
  ;

rule disable-old-compiler ( properties * )
{
  local result ;
  if <toolset>msvc in $(properties)
  {
    # MSVC++ 12.0 (Visual Studio 2013)
    if <toolset-msvc:version>12.0 in $(properties)
    {
      echo ****** This MSVC++ version is too old ****** ;
      result = <build>no ;
    }
  }
  # else if for other oldies

  return $(result) ;
}

My Boost.jam fu is very limited, so there likely is a better solution.

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk