Boost logo

Boost :

Subject: Re: [boost] [predef] Announce: Build time configuration for Predef defs.
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-01-27 18:47:22


On 1/27/2015 4:29 PM, Rene Rivera wrote:
> Following on the concept by Peter Dimov of using the BBv2 config feature
> combined with tests I'm pleased to announce that Predef now has a similar
> feature.
>
> In the develop branch of Predef you can now do the following:
>
> import ../libs/predef/check/predef : require : predef-require ;
> run macos_only_test.cpp : : : [ predef-require "BOOST_OS_MACOS" ] ;
> run vc15_only_test.cpp : : : [ predef-require "BOOST_COMP_MSVC >= 15.0.0"
> ] ;
>
> The expression(s) to check can use any of the definitions that Predef has.
> The general for is: "<DEF> <OP> <VERSION>". Where <OP> is any of the usual
> C/C++ relational operators. And <VERSION> is a partial or complete triplet
> of integers. You can specify multiple checked expressions that are all
> required. Also part of this is a more general "check" rule that allows for
> custom build requirements. For example:
>
> import ../libs/predef/check/predef : require check : predef-require
> predef-check ;
> run macos_only_test.cpp : : : [ predef-require "BOOST_OS_MACOS" ] ;
> run vc15_only_test.cpp : : : [ predef-check "BOOST_COMP_MSVC >= 15.0.0" :
> <define>THIS_IS_MSVC : <build>no ] ;
>
> I'll put this into master as soon as I have appropriate documentation.
>
> Enjoy.

Excellent and thank you ! Now we have yet another way of specifying
which tests can be run for what environments. With John Maddock's
improvements with configuration targets, Peter Dimov's suggestions
regarding features.subfeatures, and your current improvements using
Predef to choose a particular environment, we now have many more options
for configuring Boost Build tests.


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