Boost logo

Boost :

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
>> VMD
>> >> jamfile the use of predef-check, for any given compile or run rule,
>> looks
>> >> 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
>> command
>> >> line.
>> >>
>> >> This initially suggests to me that you are treating more than one
>> quoted
>> >> predef definition as an OR gate rather than an AND gate. But note that
>> on
>> >> QNX, where where "BOOST_OS_QNX != 0" and "BOOST_COMP_GNUC >= 4.3" is
>> true,
>> >> the '-std=c++0x' is not being added. So your logic seems to be that as
>> you
>> >> go through multiple predef definitions once you hit a 'true' condition
>> you
>> >> 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
>> is
>> >> 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 ==
> undefined".
>

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