Skip to content

Commit b63d44e

Browse files
committed
Delay the warning that the Boost.Python Jamfile emits, until someone actually tries to use the library. Fixes #2417.
[SVN r62895]
1 parent 52d7dff commit b63d44e

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

build/Jamfile.v2

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@ if ! [ python.configured ] && ! ( --without-python in [ modules.peek : ARGV ] )
1414
# Attempt default configuration of python
1515
import toolset : using ;
1616
using python ;
17-
18-
if ! [ python.configured ]
19-
{
20-
ECHO "WARNING: No python installation configured and autoconfiguration" ;
21-
ECHO " failed. See http://www.boost.org/libs/python/doc/building.html" ;
22-
ECHO " for configuration instructions or pass --without-python to" ;
23-
ECHO " suppress this message and silently skip all Boost.Python targets" ;
24-
}
17+
}
18+
19+
if [ python.configured ] || ( --without-python in [ modules.peek : ARGV ] )
20+
{
21+
alias config-warning ;
22+
}
23+
else
24+
{
25+
message config-warning
26+
: "warning: No python installation configured and autoconfiguration"
27+
: "note: failed. See http://www.boost.org/libs/python/doc/building.html"
28+
: "note: for configuration instructions or pass --without-python to"
29+
: "note: suppress this message and silently skip all Boost.Python targets"
30+
;
2531
}
2632

2733
rule find-py3-version
@@ -122,6 +128,7 @@ rule lib_boost_python ( is-py3 ? )
122128
# as it's not possible anyway, and to cause dependents to
123129
# fail to build
124130
[ unless [ python.configured ] : <build>no ]
131+
<dependency>config-warning
125132

126133
<python-debugging>on:<define>BOOST_DEBUG_PYTHON
127134
[ cond $(is-py3) : <python>$(py3-version) ]

0 commit comments

Comments
 (0)