On Thu, Dec 19, 2013 at 2:46 PM, Peter Dimov
Peter Dimov wrote:
Steven Watanabe wrote:
import feature ; feature.feature cxx11 : on : optional composite propagated ; feature.compose <cxx11>on : <toolset>gcc:<cxxflags>-std=c++11 ;
Thanks Steven. Putting this in my user-config.jam works in that it creates the feature and allows me to use it, but it doesn't actually seem to pass -std=c++11 to the compiler.
In this thread:
http://boost.2283326.n4.nabble.com/Building-OpenMP-targets-td4650306.html
it's claimed that feature.compose doesn't parse its second argument properly, which is why the above doesn't work, although it's supposed to.
This, however, works:
import feature ; import toolset ;
using gcc ;
feature.subfeature toolset gcc : std : cxx11 : optional composite propagated ; feature.compose toolset-gcc:stdcxx11 : <cxxflags>-std=c++11 ;
and is actually better for my needs, because it supports building for both C++03 and C++11 at once:
b2 toolset=gcc,gcc-cxx11
Just wanted to ask if this could be added to the official Boost.Build code. Ideally, the produced binaries should also be mangled with the C++ version. I suppose, the new toolset name does that already?