Boost logo

Boost-Build :

Subject: [Boost-build] Using feature.compose with a toolset compiler version
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-05-05 17:15:14


Let's suppose I have ( in user-config.jam ):

import feature ;
using gcc : 5.2 : some_path/g++ ;
using gcc : 5.3 : some_other_path/g++ ;

I want to use feature.compose with a particular version of gcc. So I try:

feature.subfeature toolset gcc-5.3 : cpplevel : cxx11 : optional
composite propagated ;
feature.compose <toolset-gcc-5.3:cpplevel>cxx11 : <cxxflags>-std=c++11

I then try:

b2 toolset=gcc-5.3-cxx11

but I get:

E:/Programming/VersionControl/modular-boost/tools/build/src/tools\gcc.jam:123:
in gcc.init from module gcc
error: toolset gcc initialization:
error: version '5.3-cxx11' requested but 'g++-5.3-cxx11' not found and
version '5.3.0' of default 'g++' does not match
error: initialized from
E:/Programming/VersionControl/modular-boost/tools/build/src/build\toolset.jam:43:
in toolset.using from module toolset
E:/Programming/VersionControl/modular-boost/tools/build/src\build-system.jam:461:
in process-explicit-toolset-requests from module build-system
E:/Programming/VersionControl/modular-boost/tools/build/src\build-system.jam:527:
in load from module build-system
E:\Programming\VersionControl\modular-boost\tools\build\src/kernel\modules.jam:295:
in import from module modules
E:\Programming\VersionControl\modular-boost\tools\build\src/kernel/bootstrap.jam:139:
in boost-build from module
E:\Programming\VersionControl\modular-boost\boost-build.jam:17: in
module scope from module

So I change my feature lines to:

feature.subfeature toolset gcc : cpplevel : cxx11 : optional composite
propagated ;
feature.compose <toolset-gcc:cpplevel>cxx11 : <cxxflags>-std=c++11

and try again:

b2 toolset=gcc-5.3-cxx11

but I get:

notice: could not find main target cxx11
notice: assuming it is a name of file to create.
E:/Programming/VersionControl/modular-boost/tools/build/src/build\feature.jam:768:
in expand-composites from module feature
error: expansions of composite features result in conflicting values for
error: values: xsltproc
error: one contributing composite property was <toolset-gcc:cpplevel>cxx11
E:/Programming/VersionControl/modular-boost/tools/build/src/build\feature.jam:867:
in feature.expand from module feature
E:/Programming/VersionControl/modular-boost/tools/build/src/build\property-set.jam:159:
in class_at_property-set.expand from module object(property-set)@2431
E:/Programming/VersionControl/modular-boost/tools/build/src/build\targets.jam:739:
in class_at_main-target.generate from module object(main-target)@2382
E:/Programming/VersionControl/modular-boost/tools/build/src/build\targets.jam:272:
in class_at_project-target.generate from module object(project-target)@2174
E:/Programming/VersionControl/modular-boost/tools/build/src\build-system.jam:714:
in load from module build-system
E:\Programming\VersionControl\modular-boost\tools\build\src/kernel\modules.jam:295:
in import from module modules
E:\Programming\VersionControl\modular-boost\tools\build\src/kernel/bootstrap.jam:139:
in boost-build from module
E:\Programming\VersionControl\modular-boost\boost-build.jam:17: in
module scope from module

What is the setup of the feature.compose and the passed toolset that
will get this to work properly so that I can use feature.compose with a
particular version of gcc ?


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