|
Boost : |
Subject: Re: [boost] [predef] Announce: Build time configuration forPredefdefs.
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-28 06:26:51
> Regarding predef-require, is it possible to combine several conditions
> using and/or? I see that you've said
>
> > You can specify multiple checked expressions that are all required.
>
> which probably means "and" (predef-require probably returns <build>no when
> the condition doesn't hold, so I see how it can be repeated).
Looking at the code, I see that what you meant was
[ predef-require "BOOST_COMP_MSVC <= 15.0.0 BOOST_COMP_MSVC >= 12.0.0" ]
that is, multiple expressions can be specified in the string itself, and all
of them need to hold.
Not, as I thought,
[ predef-require "BOOST_COMP_MSVC <= 15.0.0" ] [ predef-require
BOOST_COMP_MSVC >= 12.0.0" ]
although this should also work, I think.
But there seems to be no way to specify logical or. Although it could
probably be done by duplicating the run rule.
run msvc-or-gcc-test.cpp : : : [ predef-require "BOOST_COMP_MSVC" ] ;
run msvc-or-gcc-test.cpp : : : [ predef-require "BOOST_COMP_GCC" ] ;
If you're taking (feature &~ pull) requests, I would venture that it would
be more intuitive if it supported
[ predef-require "BOOST_COMP_MSVC <= 15.0.0 && BOOST_COMP_MSVC >= 12.0.0" ]
and
[ predef-require "BOOST_COMP_MSVC || BOOST_COMP_GCC" ]
though :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk