Bypass Boost checks on --clean

This commit is contained in:
Kenneth Heafield 2011-12-05 02:53:35 -08:00
parent 7f26ac50fb
commit 761be56e74

View File

@ -69,6 +69,9 @@ rule _shell ( cmd : extras * ) {
import option ;
cleaning = [ option.get "clean" : : yes ] ;
cleaning ?= [ option.get "clean-all" : no : yes ] ;
#Run g++ with empty main and these arguments to see if it passes.
rule test_flags ( flags ) {
if [ SHELL $(TOP)"/jam-files/test.sh "$(flags) ] = 0 {
@ -101,12 +104,12 @@ if $(with-boost) {
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 {
boost-shell = [ SHELL "g++ "$(I-boost-include)" -dM -x c++ -E /dev/null -include boost/version.hpp 2>/dev/null |grep '#define BOOST_VERSION '" : exit-status ] ;
if $(boost-shell[2]) != 0 && $(cleaning) = no {
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 {
if $(boost-version) < 103600 && $(cleaning) = no {
exit You have Boost $(boost-version). Moses requires at least 103600 (and preferably newer). : 1 ;
}
#Are we linking static binaries against shared boost?