Boost logo

Boost-Build :

Subject: [Boost-build] Cannot get feature/subfeature not working with Oracle Solaris Studio C++ compiler
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-03-26 08:15:53


I am trying to use the feature/subfeature part boost build in order to
run different setups of the Oracle Solaris Studio C++ compiler on Linux.
This is still called the 'sun' compiler in the Boost Build
doocumentation. Under linux I have versions 12.2, 12.3, and 12.4 on the
compiler installed. I have a bash file for switching between the
versions before using build to invoke the sun compiler.

My lines in user_config.jam for sun are:

import feature ;
import toolset ;

using sun : 12.2 : : <cxxflags>-features=tmplife
<cxxflags>-features=tmplrefstatic ;
using sun : 12.3 : : <cxxflags>-features=tmplife
<cxxflags>-features=tmplrefstatic ;
using sun : 12.4 : : <cxxflags>-features=tmplife
<cxxflags>-features=tmplrefstatic ;

feature.subfeature toolset sun-12.4 : library : stlport apache cxx03
cxx11 : optional composite propagated ;

feature.compose <toolset-sun-12.4:library>stlport :
<cxxflags>-library=stlport4 ;
feature.compose <toolset-sun-12.4:library>apache :
<cxxflags>-library=stdcxx4 ;
feature.compose <toolset-sun-12.4:library>cxx03 : <cxxflags>-std=c++03 ;
feature.compose <toolset-sun-12.4:library>cxx11 : <cxxflags>-std=c++11 ;

If I then invoke b2 with

b2 toolset=sun-cxx11

I would then assume that -std=c++11 is part of the compiler command
line. But it is not. Instead -library=stlport is part of the compiler
command line no matter how I invoke the compiler.

How do I correct this so that I can pass -std=c++11 and not pass
-library=stlport to the command line of the compiler ?


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