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 <kenlm@kheafield.com>2011-11-21 18:31:10 +0400
committerKenneth Heafield <kenlm@kheafield.com>2011-11-21 18:31:10 +0400
commit21d55d2c261311c4c1312bbf1778b4777963d2aa (patch)
tree58392cfc337621afa127cdac1d28497db754869a /Jamroot
parent7e27cd1d8acb1ddc31f5751500f1570c629d0565 (diff)
Jam: Documentation, link against -mt, SRI warnings off
Diffstat (limited to 'Jamroot')
-rw-r--r--Jamroot43
1 files changed, 35 insertions, 8 deletions
diff --git a/Jamroot b/Jamroot
index 66366b818..f4a9f965f 100644
--- a/Jamroot
+++ b/Jamroot
@@ -1,17 +1,44 @@
+#MOSES BUILD OPTIONS
+#
+#Language models
+#--with-irstlm=/path/to/irstlm
+#--with-srilm=/path/to/srilm
+#--with-randlm=/path/to/randlm
+#KenLM is always compiled.
+#
+#threading=single compiles single-threaded
+#
+#variant=debug for debugging (or just "debug")
+#variant=profile for profiling
+#
+#link=shared for dynamic linking
+#
+#--install=/path/to/install sets the install directory (default dist)
+#--notrace compiles without TRACE macros
+#
+#-j$NCPUS to compile in parallel
+#
+
path-constant TOP : . ;
import option ;
-#The linked Boost libraries we use so far. Link shared because most people don't have the static version.
-import boost ;
-boost.use-project ;
#If boost static libraries are not installed, use dynamic linking.
-if [ SHELL $(TOP)"/jam-files/test.sh -static -lboost_thread" ] = 1 {
+if [ SHELL $(TOP)"/jam-files/test.sh -static -lboost_program_options" ] = 1 {
force-boost-link = "<link>shared" ;
}
-alias boost_thread : /boost//thread : $(force-boost-link) ;
-alias boost_unit_test_framework : /boost//unit_test_framework : $(force-boost-link) ;
-alias boost_program_options : /boost//program_options : $(force-boost-link) ;
+#Convenience rule for boost libraries. Defines library boost_$(name).
+#If multi-threaded, links against the -mt version.
+#With shared linkage, defines macro. See tools/build/v2/contrib/boost.jam in a
+#boost tarball for a table of dynamic linking macros.
+rule boost_lib ( name macro ) {
+ lib boost_$(name) : : <threading>single <name>boost_$(name) $(force-boost-link) : : <link>shared:<define>BOOST_$(macro) ;
+
+ lib boost_$(name) : : <threading>multi <name>boost_$(name)-mt $(force-boost-link) : : <link>shared:<define>BOOST_$(macro) ;
+}
+boost_lib thread THREAD_DYN_DLL ;
+boost_lib program_options PROGRAM_OPTIONS_DYN_LINK ;
+boost_lib unit_test_framework TEST_DYN_LINK ;
trace = [ option.get "notrace" : : <define>TRACE_ENABLE=1 ] ;
@@ -29,7 +56,7 @@ project : requirements
$(trace)
;
-#Add directories here if they have other incidental targets
+#Add directories here if you want their incidental targets too (i.e. tests).
build-project lm ;
build-project util ;