On 6/10/2015 12:36 AM, Rene Rivera wrote:
On Tue, Jun 9, 2015 at 10:34 PM, Rene Rivera
wrote: On Tue, Jun 9, 2015 at 9:56 PM, Jessica Hamilton < jessica.l.hamilton@gmail.com> wrote:
On Fri, Jun 5, 2015 at 9:42 PM, Edward Diener
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
On 9 June 2015 at 19:40, Rene Rivera
wrote: 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.