diff options
author | Kenneth Heafield <github@kheafield.com> | 2011-11-26 16:18:17 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2011-11-26 16:18:17 +0400 |
commit | 5a40524effad9270b588055153bffc597b283ca0 (patch) | |
tree | 66a7cc5a8ba127cb5dfde0ab5cbe66bc59cd26eb /Jamroot | |
parent | aadd7dee68f5a0aa789262be99ac9a447d0d4809 (diff) |
Check for boost and version number
Diffstat (limited to 'Jamroot')
-rw-r--r-- | Jamroot | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -82,11 +82,22 @@ 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 ; + I-boost-include = -I$(with-boost)/include ; boost-include = <include>$(with-boost)/include ; } else { L-boost-search = "" ; boost-search = ; - boost-incldue = ; + I-boost-include = "" ; + boost-include = ; +} + +boost-shell = [ SHELL "g++ "$(I-boost-include)" -dM -x c++ -E /dev/null -include boost/version.hpp |grep '#define BOOST_VERSION '" : exit-status ] ; +if $(boost-shell[2]) != 0 { + exit Boost does not seem to be installed or g++ is confused. : 1 ; +} +boost-version = [ MATCH "#define BOOST_VERSION ([0-9]*)" : $(boost-shell[1]) ] ; +if $(boost-version) < 103600 { + exit You have Boost $(boost-version). Moses requires at least 103600 (and preferably newer). : 1 ; } #Are we linking static binaries against shared boost? boost-auto-shared = [ auto_shared "boost_program_options" : L-boost-search ] ; @@ -147,7 +158,7 @@ build-project util ; build-project mert ; build-project moses-cmd/src ; build-project moses-chart-cmd/src ; -#Scripts have their own binaries +#Scripts have their own binaries. build-project scripts ; install-location = [ option.get "install" : $(TOP)/dist ] ; |