Boost logo

Boost :

Subject: Re: [boost] Recommend dropping test coverage on msvc-7.1 and msvc-8.0
From: Peter Dimov (lists_at_[hidden])
Date: 2017-10-16 12:02:44


Ion Gaztañaga wrote:

> I think it would be nice if there was a way (maybe it exists now) to state
> in the test/build jamfile the minimum supported toolchains (say msvc >=
> 9.0, gcc >= 4.2) by that library / test.

There is! There are, three of them. One, you can use the Config build
requirement feature:

http://www.boost.org/doc/libs/1_65_1/libs/config/doc/html/boost_config/build_config.html

as I've done here:

https://github.com/boostorg/mp11/blob/develop/test/Jamfile#L12

You just have to pick the right set of requirements that include all of the
compilers you care about, as sometimes the Config macro is set but you still
want to go ahead with the test (f.ex. NO_CXX11_HDR_TYPE_TRAITS on gcc-4.7 in
my case.)

Two, you can use Predef in the exact same manner, to check any Predef macro:

http://www.boost.org/doc/libs/1_65_1/doc/html/predef/check_utilities.html

Three, you can just use a built-in Boost.Build feature:

    project : requirements <toolset>msvc-7:<build>no
<toolset>gcc-4.1:<build>no ;

This doesn't allow you to compare versions with greater-than, it's just a
match, but you could still enumerate whatever you want excluded, and is
probably the easiest way to address the msvc-7.1 issue.

You can also use all these for a specific test instead of globally, such as
f.ex. here:

https://github.com/boostorg/vmd/blob/develop/test/Jamfile.v2#L141


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