Subject: Re: [boost] [predef] Using predef-check on 'develop' problem
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2015-06-10 00:36:04
On Tue, Jun 9, 2015 at 10:34 PM, Rene Rivera <grafikrobot_at_[hidden]> wrote:
> On Tue, Jun 9, 2015 at 9:56 PM, Jessica Hamilton <
> jessica.l.hamilton_at_[hidden]> wrote:
>> On 9 June 2015 at 19:40, Rene Rivera <grafikrobot_at_[hidden]> wrote:
>> > On Fri, Jun 5, 2015 at 9:42 PM, Edward Diener <eldiener_at_[hidden]>
>> > wrote:
>> >> I think I know what is wrong in the predef-check functionality. In my
>> >> jamfile the use of predef-check, for any given compile or run rule,
>> >> like:
>> >> [ predef-check "BOOST_COMP_GNUC >= 4.3" "BOOST_OS_QNX == 0" : :
>> >> <cxxflags>-std=c++0x ]
>> > Yes..
>> > What I am seeing is that except on QNX, where "BOOST_OS_QNX != 0", the
>> >> '-std=c++0x' is always being added as a C++ compiler flag to the
>> >> line.
>> >> This initially suggests to me that you are treating more than one
>> >> predef definition as an OR gate rather than an AND gate. But note that
>> >> QNX, where where "BOOST_OS_QNX != 0" and "BOOST_COMP_GNUC >= 4.3" is
>> >> the '-std=c++0x' is not being added. So your logic seems to be that as
>> >> go through multiple predef definitions once you hit a 'true' condition
>> >> choose the 'true' path as long as no 'false' conditions follow it,
>> else you
>> >> choose the 'false' path.
>> >> Please see if you can fix this given this clue about how predef-check
>> >> working for the VMD regression tests on various platforms/compilers.
>> > I don't know if it helped but I did a change to one of the tests I do to
>> > completely cover all the Venn variations of the binary and expression. I
>> > changed my test to this:
>> > [ run check_value.cpp : : : <test-info>always_show_run_output
>> > [ predef-check "BOOST_COMP_CLANG > 0" "BOOST_OS_LINUX == 0" : :
>> > <cxxflags>-DCHECK_VALUE=true : <cxxflags>-DCHECK_VALUE=false ] ]
>> Out of curiosity, what happens if you remove the second <cxxflags>
>> variable, and use an #ifndef check, and run again? It's the only
>> difference I can notice between the two examples.
> OK.. Did that change. My local OSX test shows "CHECK_VALUE == 1" as
> expected and correctly. In a few minutes I'll post what the online tests
> show. But the expectation is that they should all show "CHECK_VALUE ==
And the online tests are now done. And indeed they all print out
"CHECK_VALUE == undefined".
-- -- 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