From: g0dil Date: Mon, 30 Aug 2010 08:17:10 +0000 (+0000) Subject: Add support for setting BOOST_VERSION on the scons command line X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=69a4d13fef0b93fb9f834977b880d40101a89d6a;p=senf.git Add support for setting BOOST_VERSION on the scons command line git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1700 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/site_scons/site_tools/Boost.py b/site_scons/site_tools/Boost.py index 629dd3e..7e20e2b 100644 --- a/site_scons/site_tools/Boost.py +++ b/site_scons/site_tools/Boost.py @@ -142,10 +142,14 @@ Options: else: msg = '' context.Message( "Checking boost version%s... " % msg ) - ret = context.TryRun("#include \n" - "#include \n" - "int main(int, char **) { std::cout << BOOST_LIB_VERSION << std::endl; }", - ".cc")[-1].strip() + if context.env.has_key('BOOST_VERSION'): + ret = context.env['BOOST_VERSION'] + else: + ret = context.TryRun("#include \n" + "#include \n" + "int main(int, char **)\n" + "{ std::cout << BOOST_LIB_VERSION << std::endl; }", + ".cc")[-1].strip() if not ret: msg = "no boost includes found"