Boost logo

Boost :

Subject: Re: [boost] [predef] Announce: Build time configuration for Predef defs.
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2015-01-27 22:01:27


On Tue, Jan 27, 2015 at 5:47 PM, Edward Diener <eldiener_at_[hidden]>
wrote:

> 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 !

You are welcome!

> 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.
>

I think we are the point now that we can now replace the explicit markup.
With a setup that can do considerably more. I'm also thinking of more
additions to Boost Build itself (I used one of them to implement the Predef
support) that could be used to further of my goal of improving the testing
system. So if people have suggestions I'd love to hear them.

PS. And yes, I'm already aware of the desire for master/develop split
testing. We'll get there eventually.

-- 
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

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