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>2011-11-25 15:55:36 +0400
committerKenneth Heafield <github@kheafield.com>2011-11-25 15:55:36 +0400
commit9d994ffc5cfccff18e59806900990a7d5cc4a1a8 (patch)
treea05484c583612800b7a657c0db03f8c84dd9bc3d /Jamroot
parent13848b1ea3a0fb4fa49bdab2c451fdd9f8d9544b (diff)
--with-boost
Diffstat (limited to 'Jamroot')
-rw-r--r--Jamroot37
1 files changed, 26 insertions, 11 deletions
diff --git a/Jamroot b/Jamroot
index 7813aa510..ff6dfb556 100644
--- a/Jamroot
+++ b/Jamroot
@@ -1,11 +1,15 @@
#MOSES BUILD OPTIONS
#
#Language models
-#--with-irstlm=/path/to/irstlm
-#--with-srilm=/path/to/srilm
+#--with-irstlm=/path/to/irstlm
+#--with-srilm=/path/to/srilm See moses/src/LM/Jamfile for more options.
#--with-randlm=/path/to/randlm
#KenLM is always compiled.
#
+#--with-boost=/path/to/boost
+#If Boost is in a non-standard location, specify it here. This directory is
+#expected to contain include and lib or lib64.
+#
#--with-xmlrpc-c=/path/to/xmlrpc-c for libxmlrpc-c (used by server)
#Note that, like language models, this is the --prefix where the library was
#installed, not some executable within the library.
@@ -55,29 +59,40 @@ rule test_flags ( flags ) {
}
}
-rule auto_shared ( name ) {
- if [ test_flags "-static -l "$(name) ] {
+rule auto_shared ( name : additional ? ) {
+ additional ?= "" ;
+ if [ test_flags $(additional)" -static -l"$(name) ] {
return ;
} else {
return "<link>shared" ;
}
}
-#Are we
-boost-auto-shared = [ auto_shared "boost_program_options" ] ;
+with-boost = [ option.get "with-boost" ] ;
+if $(with-boost) {
+ L-boost-search = -L$(with-boost)/lib" "-L$(with-boost)/lib64 ;
+ boost-search = <search>$(with-boost)/lib <search>$(with-boost)/lib64 ;
+ boost-include = <include>$(with-boost)/include ;
+} else {
+ L-boost-search = "" ;
+ boost-search = ;
+ boost-incldue = ;
+}
+#Are we linking static binaries against shared boost?
+boost-auto-shared = [ auto_shared "boost_program_options" : L-boost-search ] ;
#Convenience rule for boost libraries. Defines library boost_$(name).
rule boost_lib ( name macro ) {
#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 "-lboost_"$(name)"-mt" ] {
- lib inner_boost_$(name) : : <threading>single <name>boost_$(name) ;
- lib inner_boost_$(name) : : <threading>multi <name>boost_$(name)-mt ;
+ 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 ;
} else {
- lib inner_boost_$(name) : : <name>boost_$(name) ;
+ lib inner_boost_$(name) : : $(boost-search) <name>boost_$(name) ;
}
- alias boost_$(name) : inner_boost_$(name) : $(boost-auto-shared) : : <link>shared:<define>BOOST_$(macro) ;
+ alias boost_$(name) : inner_boost_$(name) : $(boost-auto-shared) : : <link>shared:<define>BOOST_$(macro) $(boost-include) ;
}
#See tools/build/v2/contrib/boost.jam in a boost distribution for a table of macros to define.
boost_lib thread THREAD_DYN_DLL ;