Boost logo

Boost-Build :

Subject: Re: [Boost-build] adding tests conditional on compiler's C++11 support
From: Robert Ramey (ramey_at_[hidden])
Date: 2016-11-10 11:56:21

On 9/28/16 12:18 PM, Steven Watanabe wrote:
> On 09/28/2016 12:34 PM, Stefan Seefeld wrote:
>> what is the way to add a set of tests to my (Boost.Python)
>> test suite only if the given compiler supports C++11 ? To break that
>> down into two questions:
>> * Is there a Boost.Build flag I can check for that indicates whether the
>> current compiler supports C++11 ?
>> * How can I conditionalize the adding of tests to my test suite based on
>> that flag ?
> Try using config.requires:

This is what I do and it seems to work - mostly. In particular I have
one test test_forward_list which exposes the following problem:

My test/jamfile.v2 includes

      [ test-bsl-run_files test_forward_list : A : : [ requires
cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
      [ test-bsl-run_files test_forward_list_ptrs : A : : [ requires
cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST

the test_forward list contains
#error "cannot run this test

One particular case illustrates the problem. See the test matrix
the test columns Sandia-darwin-c++11 and Sandia-darwin. Also of
interest is the adjacent column timber-macOS. All tests are shown being
run with compiler version 4.2.1. (I'll leave aside the question as what
difference the clang part of the compiler name means.

One column shows test_forward... failing with the above test. It gets
the value of BOOST_NO_CXX11_HDR_FORWARD_LIST from the config file.
While the bjam processor gets the "requires" from ...? It seems they
are not getting these from the same source and that they are getting
different values. In particular it looks like Jam is testing for the
existence of <forward_list> which my program is checking config.hpp and
that these are out of sync.

I don't know what to do about other than suppress the check. I think
it's a mistake somewhere but I can't see where it is.

Robert Ramey

> In Christ,
> Steven Watanabe
> _______________________________________________
> Unsubscribe & other changes:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at