Check for boost and version number

This commit is contained in:
Kenneth Heafield 2011-11-26 12:18:17 +00:00
parent 95fc3d6e60
commit 82d40e4044

15
Jamroot
View File

@ -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 ] ;