Boost logo

Boost-Build :

Subject: Re: [Boost-build] adding tests conditional on compiler's C++11 support
From: John Maddock (jz.maddock_at_[hidden])
Date: 2016-11-13 14:37:12


On 12/11/2016 19:44, Robert Ramey wrote:
> I spent a little time investigating this issue and a couple of things
> have occurred to me.
>
> I still after all these years can't get the hang of boost build syntax
> - but I still tried to look through how these "requires" statements
> are implemented. I found the files in config/test. Here's one
>
> #include <forward_list>
>
> namespace boost_no_cxx11_hdr_forward_list {
>
> int test()
> {
> std::forward_list<int> l(2u, 2);
> return *l.begin() == 2 ? 0 : 1;
> }
>
> }
>
> Now it seems to me that this really should be:
>
> #include <config.hpp>
> #include <forward_list>
>

No. The tests are used to test Boost.Config, the one thing they must
never ever do is include config.hpp.

If I have some spare time (and I'm sorry, but I simply don't at
present), I'll install gcc-4.2 and see what the issue is.

> The test matrix shows a lot of places where test_forward_list is being
> run (and passing FWIW) on compilers which look like they are invoked
> in such a way that they don't support C++11+. This is very, very
> confusing and makes it unclear just what the test system results
> actually mean and how they are meant to be used.

If in doubt about what a compiler is, look at the config_info output for
that test runner, for example:
http://www.boost.org/development/tests/develop/developer/output/Sandia-darwin-c++11-boost-bin-v2-libs-config-test-config_info-test-darwin-4-2-1-debug.html
Note that the name of the test-runner in this case is
"Sandia-darwin-c++11" which sort of gives things away, even if the
column heading simply says "gcc-4.2.1".

>
> Another issue:
>
> The mngw tests are all failing to compile. (though it seems that the
> libraries are being built.) This seems to be because that the file
> system library library needs BOOST_NO_STD_WSTRING in order to build.
> So in this case, it would likely be better just to not run the tests
> for the wide character versions of archives at all. For the Nth time,
> I read over the boost build syntax and I can't figure out how to
> implement this. I'm happy to read any suggestions. Another idea
> would be to remove dependency of the serialization library tests on
> the boost filesystem library. I used to be this way, but someone
> "helpfully" improved the test code so that it now depends upon this
> library. I left this in as it did seem to be an improvement. So a
> bjam solution would likely be better. I'm all ears.
>
> Of course it's not all that clear why boost.filesystem should depend
> upon wstring when it could conjure up basic_string<wchar_t> but I
> can't go everywhere.

They're the same thing!

Best, John.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk