From 761be56e74d16d26d37c138b862e91e71bed9383 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 5 Dec 2011 02:53:35 -0800 Subject: [PATCH] Bypass Boost checks on --clean --- Jamroot | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jamroot b/Jamroot index 40d3bca9b..5df98b6f0 100644 --- a/Jamroot +++ b/Jamroot @@ -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?