mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
If statically linking, check static libs for -mt
This commit is contained in:
parent
c8448ded97
commit
3203f7c92d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user