From b63d44e7812ee7f882103ff15bd7098618cfdc8d Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Sun, 13 Jun 2010 04:00:10 +0000 Subject: [PATCH] Delay the warning that the Boost.Python Jamfile emits, until someone actually tries to use the library. Fixes #2417. [SVN r62895] --- build/Jamfile.v2 | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index cc8a8be2..32bffb0f 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -14,14 +14,20 @@ if ! [ python.configured ] && ! ( --without-python in [ modules.peek : ARGV ] ) # Attempt default configuration of python import toolset : using ; using python ; - - if ! [ python.configured ] - { - ECHO "WARNING: No python installation configured and autoconfiguration" ; - ECHO " failed. See http://www.boost.org/libs/python/doc/building.html" ; - ECHO " for configuration instructions or pass --without-python to" ; - ECHO " suppress this message and silently skip all Boost.Python targets" ; - } +} + +if [ python.configured ] || ( --without-python in [ modules.peek : ARGV ] ) +{ + alias config-warning ; +} +else +{ + message config-warning + : "warning: No python installation configured and autoconfiguration" + : "note: failed. See http://www.boost.org/libs/python/doc/building.html" + : "note: for configuration instructions or pass --without-python to" + : "note: suppress this message and silently skip all Boost.Python targets" + ; } rule find-py3-version @@ -122,6 +128,7 @@ rule lib_boost_python ( is-py3 ? ) # as it's not possible anyway, and to cause dependents to # fail to build [ unless [ python.configured ] : no ] + config-warning on:BOOST_DEBUG_PYTHON [ cond $(is-py3) : $(py3-version) ]