summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-05-25 12:00:45 -0400
committerKenneth Heafield <github@kheafield.com>2012-05-25 12:00:45 -0400
commita7bb404456734765b2e46a74410024e293b8c2d3 (patch)
treee5d0ce1678d1069ac137425c1b1ea9b54257e965
parent7cadcdc7ce1e3441cf1ede4058bc2dbab563f44c (diff)
Force multi-threaded build if only multi-threaded Boost is present.
-rw-r--r--Jamroot3
-rw-r--r--jam-files/sanity.jam14
2 files changed, 12 insertions, 5 deletions
diff --git a/Jamroot b/Jamroot
index edc28e23..938a9764 100644
--- a/Jamroot
+++ b/Jamroot
@@ -26,9 +26,8 @@ if [ test_header boost/serialization/map.hpp ] && [ test_library boost_serializa
requirements += <define>HAVE_BOOST_ARCHIVE_TEXT_OARCHIVE_HPP ;
}
-# project : requirements $(requirements) ;
project : requirements $(requirements) <toolset>darwin:<link>static ;
-project : default-build <threading>single <warnings>on <variant>release ;
+project : default-build <warnings>on <variant>release ;
install-bin-libs dpmert//programs utils//programs mteval//programs klm/lm//programs training//liblbfgs decoder//cdec creg//creg phrasinator//programs mira//kbest_mira ;
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam
index 2a5fc381..4e0432f9 100644
--- a/jam-files/sanity.jam
+++ b/jam-files/sanity.jam
@@ -87,6 +87,8 @@ else {
boost-include = ;
}
}
+
+requirements = ;
#Are we linking static binaries against shared boost?
boost-auto-shared = [ auto-shared "boost_program_options" : $(L-boost-search) ] ;
@@ -96,8 +98,15 @@ rule boost-lib ( name macro ) {
#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) ;
- lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt ;
+# if [ test_flags $(L-boost-search)" -lboost_"$(name) ] {
+# lib inner_boost_$(name) : : <threading>single $(boost-search) <name>boost_$(name) ;
+# lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt ;
+# } else {
+ if ! <threading>multi in $(requirements) {
+ requirements += <threading>multi ;
+ }
+ lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt ;
+# }
} else {
lib inner_boost_$(name) : : $(boost-search) <name>boost_$(name) ;
}
@@ -149,7 +158,6 @@ rule external-lib ( name : search-path * ) {
local ignored = @($(build-log):E=$(script)) ;
}
-requirements = ;
{
#Boost jam's static clang is buggy.
requirements += <cxxflags>$(cxxflags) <cflags>$(cflags) <linkflags>$(ldflags) <toolset>clang:<link>shared ;