diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2011-11-21 18:31:10 +0400 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2011-11-21 18:31:10 +0400 |
commit | 21d55d2c261311c4c1312bbf1778b4777963d2aa (patch) | |
tree | 58392cfc337621afa127cdac1d28497db754869a /Jamroot | |
parent | 7e27cd1d8acb1ddc31f5751500f1570c629d0565 (diff) |
Jam: Documentation, link against -mt, SRI warnings off
Diffstat (limited to 'Jamroot')
-rw-r--r-- | Jamroot | 43 |
1 files changed, 35 insertions, 8 deletions
@@ -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 ; |