|
Boost : |
Subject: Re: [boost] Testing and toolsets
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-19 11:28:38
Robert Ramey wrote:
> When I run tests on my local system with gcc or clang I use the compile
> time switch -std=c++03 or -std=c++11 on my bjam command line which gets
> passed on to the gcc/clang command line.
This isn't very convenient, because you can't run the 03 and 11 tests at the
same time (and they go into the same directory).
What I use is this (in user-config.jam):
import feature ;
import toolset ;
using gcc ;
feature.subfeature toolset gcc : std : cxx0x cxx11 cxx1y cxx14 : optional
composite propagated ;
feature.compose <toolset-gcc:std>cxx0x : <cxxflags>-std=c++0x ;
feature.compose <toolset-gcc:std>cxx11 : <cxxflags>-std=c++11 ;
feature.compose <toolset-gcc:std>cxx1y : <cxxflags>-std=c++1y ;
feature.compose <toolset-gcc:std>cxx14 : <cxxflags>-std=c++14 ;
using clang : : : <cxxflags>-Wno-variadic-macros
<cxxflags>-Wno-c99-extensions ;
feature.subfeature toolset clang : std : cxx0x cxx11 cxx1y cxx14 : optional
composite propagated ;
feature.compose <toolset-clang:std>cxx0x : <cxxflags>-std=c++0x ;
feature.compose <toolset-clang:std>cxx11 : <cxxflags>-std=c++11 ;
feature.compose <toolset-clang:std>cxx1y : <cxxflags>-std=c++1y ;
feature.compose <toolset-clang:std>cxx14 : <cxxflags>-std=c++14 ;
This allows me to run
b2 toolset=gcc,gcc-cxx11,clang,clang-cxx11
for example.
-std=c++03 is, I believe, the default, but you can add it to the above if
you like.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk