Boost logo

Boost :

Subject: Re: [boost] [predef] Using predef-check on 'develop' problem
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-06-16 20:04:53


On 6/16/2015 5:24 PM, Aparna Kumta wrote:
> On 06/10/15 03:36, Edward Diener wrote:
>> On 6/10/2015 12:36 AM, Rene Rivera wrote:
>>> 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".
>>
>> Feel free to take a look at my VMD tests jamfile. If you see anything
>> you think is wrong I can change it. I don't think it is the jamfile
>> but something having to do with the Android and SunOS operating
>> systems. I realize that I was wrong in thinking that -std=c++0x is
>> always added, annd that this was my mistake.
> The tests for SunOS do not look right.
> http://www.boost.org/development/tests/develop/developer/output/oracle-intel-S2-stlport4-boost-bin-v2-libs-vmd-test-test_after_array_elem-test-sun-stlport4-release-threading-multi.html
>
>
> 1) -Wno-variadic-macros is not a valid option on SunOS.
> 2) -std=c++0x and -compat=5 are incompatible
> 3) -std and -library=stlport4 are incompatible

Its a predef problem. See the other post I just responded to on this thread.


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