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>2013-01-05 01:02:13 +0400
committerKenneth Heafield <github@kheafield.com>2013-01-05 01:02:13 +0400
commit3203f7c92d97181d5f7d293be66873d2865d9209 (patch)
tree5ede4f9d6352d610ea795d704da1662ba0a0e673 /jam-files
parentc8448ded9753cdd5b7fd356d962d46457bc9c7c9 (diff)
If statically linking, check static libs for -mt
Diffstat (limited to 'jam-files')
-rw-r--r--jam-files/sanity.jam9
1 files changed, 6 insertions, 3 deletions
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam
index 74803b142..a35042f79 100644
--- a/jam-files/sanity.jam
+++ b/jam-files/sanity.jam
@@ -95,8 +95,7 @@ if $(with-macports) {
boost-search = <search>$(with-macports)/lib ;
I-boost-include = -I$(with-macports)/include ;
boost-include = <include>$(with-macports)/include ;
-}
-else {
+} else {
with-boost = [ option.get "with-boost" ] ;
with-boost ?= [ os.environ "BOOST_ROOT" ] ;
if $(with-boost) {
@@ -117,7 +116,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$(boost-lib-version)" ] {
+ flags = $(L-boost-search)" -lboost_"$(name)"-mt$(boost-lib-version)" ;
+ if $(boost-auto-shared) != "<link>shared" {
+ flags += " -static" ;
+ }
+ if [ test_flags $(flags) ] {
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 {