Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-08-17 01:22:44 +0400
committerKenneth Heafield <github@kheafield.com>2012-08-17 01:22:44 +0400
commit4637c4f64262a1640fb47d4af44ee29962025b90 (patch)
treeba6c13cafb3ec020c5f7f14a3355ead50b2a01ac /jam-files
parent128829ebeefff05dc343f68bb1d287100f7d9122 (diff)
Get the Boost version tag from version.hpp and include it in the name of the Boost libraries.
This will force people to use consistent headers and libraries and might fix some cases where a user has installed libraries locally on top of a system-level install.
Diffstat (limited to 'jam-files')
-rw-r--r--jam-files/sanity.jam11
1 files changed, 6 insertions, 5 deletions
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam
index fe7f21703..809a186b6 100644
--- a/jam-files/sanity.jam
+++ b/jam-files/sanity.jam
@@ -108,11 +108,11 @@ rule boost-lib ( name macro : deps * ) {
#Link multi-threaded programs against the -mt version if available. Old
#versions of boost do not have -mt tagged versions of all libraries. Sadly,
#boost.jam does not handle this correctly.
- if [ test_flags $(L-boost-search)" -lboost_"$(name)"-mt" ] {
- lib inner_boost_$(name) : : <threading>single $(boost-search) <name>boost_$(name) : : <library>$(deps) ;
- lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt : : <library>$(deps) ;
+ if [ test_flags $(L-boost-search)" -lboost_"$(name)"-mt-$(boost-lib-version)" ] {
+ lib inner_boost_$(name) : : <threading>single $(boost-search) <name>boost_$(name)-$(boost-lib-version) : : <library>$(deps) ;
+ lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt-$(boost-lib-version) : : <library>$(deps) ;
} else {
- lib inner_boost_$(name) : : $(boost-search) <name>boost_$(name) : : <library>$(deps) ;
+ lib inner_boost_$(name) : : $(boost-search) <name>boost_$(name)-$(boost-lib-version) : : <library>$(deps) ;
}
alias boost_$(name) : inner_boost_$(name) : $(boost-auto-shared) : : <link>shared:<define>BOOST_$(macro) $(boost-include) ;
@@ -120,7 +120,7 @@ rule boost-lib ( name macro : deps * ) {
#Argument is e.g. 103600
rule boost ( min-version ) {
- local cmd = "bash -c \"g++ "$(I-boost-include)" -dM -x c++ -E /dev/null -include boost/version.hpp 2>/dev/null |grep '#define BOOST_VERSION '\"" ;
+ local cmd = "bash -c \"g++ "$(I-boost-include)" -dM -x c++ -E /dev/null -include boost/version.hpp 2>/dev/null |grep '#define BOOST_'\"" ;
local boost-shell = [ SHELL "$(cmd)" : exit-status ] ;
if $(boost-shell[2]) != 0 && $(CLEANING) = no {
echo Failed to run "$(cmd)" ;
@@ -130,6 +130,7 @@ rule boost ( min-version ) {
if $(boost-version) < $(min-version) && $(CLEANING) = no {
exit You have Boost $(boost-version). This package requires Boost at least $(min-version) (and preferably newer). : 1 ;
}
+ boost-lib-version = [ MATCH "#define BOOST_LIB_VERSION \"([^\"]*)\"" : $(boost-shell[1]) ] ;
#See tools/build/v2/contrib/boost.jam in a boost distribution for a table of macros to define.
boost-lib system SYSTEM_DYN_LINK ;
boost-lib thread THREAD_DYN_DLL : boost_system ;