Subject: Re: [boost] C++11 variant of the gcc toolset?
From: Peter Dimov (lists_at_[hidden])
Date: 2013-12-19 05:46:59
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:
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:std>cxx11 : <cxxflags>-std=c++11 ;
and is actually better for my needs, because it supports building for both
C++03 and C++11 at once:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk