Boost logo

Boost-Build :

Subject: [Boost-build] Is there a way to automatically create the correct library name per build configuration?
From: Tim Simpson (timsimpson4_at_[hidden])
Date: 2012-12-10 01:20:02


Hi,

When the Boost libraries are built, they get put in the stage/lib
directory. Each variant has a special name as described in section 6.3
here: http://www.boost.org/doc/libs/1_52_0/more/getting_started/windows.html

If I want to write a Boost Build file with unit tests for one of these
scenarios, its easy. But making a single jamroot.jam that works with
multiple toolsets seems tricky.

With MSVC-11, I simply ignore the lib because MSVC provides
auto-linking. I simply add the stage/lib directory to the PATH and it
all just works.

But to my knowledge GCC needs the library name, even if I give it the
path to the directory through the various environment variables.

If I add something like:

lib boost_unit_test_framework : <name>libboost_unit_test_framework-mgw47-1_52 ;

to the jamroot.jam, it will work, but then I've made my project
configuration specific. It won't work with MSVC,

Is there a rule in Boost that can generate the naming scheme used by
the mother of all Jamroots automatically? Something like:

lib boost_unit_test_framework : <boost-name>boost_unit_test_framework ;

that would automatically pass the correct library name to pass to the linker?

Thanks,

Tim


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