Propagate toolset to prebuilt libraries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Propagate toolset to prebuilt libraries

Boost - Build mailing list
If I do

b2 toolset=msvc-12.0
versus
b2 toolset=msvc-14.0

the libraries and executables will be built and linked using the right toolset.

But what about the prebuilt libraries? I tried something like the following in the Jamfile for boost:

lib atomic :
           : <target-os>windows
             <address-model>32
             <search>$(BOOST_LIB32)
             <variant>debug
             <toolset>msvc-12.0
             <name>libboost_atomic$(BOOST_DEBUG_VC120_SUFFIX)
          :
          : <include>$(BOOST_INCLUDE)
            <source>system
          ;

lib atomic :
           : <target-os>windows
             <address-model>32
             <search>$(BOOST_LIB32)
             <variant>debug
             <toolset>msvc-14.0
             <name>libboost_atomic$(BOOST_DEBUG_VC140_SUFFIX)
          :
          : <include>$(BOOST_INCLUDE)
            <source>system
          ;

This doesn't work, because b2 complains that it can't match all of the properties. If I remove the <toolset> property from the first instance of atomic and do

b2 toolset=msvc-14.0

It still uses the default version of msvc (for me that's 12.0) and ignores the second one that has <toolset>msvc-14.0.

Is there some way for b2 to use the right prebuilt library, depending on the toolset?


_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build