Skip to content

Commit 2c83563

Browse files
authored
Add a conditional rule for enabling boost_stacktrace_from_exception. Fixes #165. (#166)
1 parent 39afcef commit 2c83563

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

build/Jamfile.v2

+19-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#
77

88
import feature ;
9+
import property ;
910
import ../../config/checks/config : requires ;
1011

1112
project
@@ -134,15 +135,31 @@ lib boost_stacktrace_windbg_cached
134135
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
135136
;
136137

138+
rule build-stacktrace-from-exception ( props * )
139+
{
140+
local enabled = [ property.select <boost.stacktrace.from_exception> : $(props) ] ;
141+
switch $(enabled:G=)
142+
{
143+
case "on" : return ;
144+
case "off" : return <build>no ;
145+
}
146+
147+
local arch = [ property.select <architecture> : $(props) ] ;
148+
if $(arch) && ( $(arch:G=) != x86 )
149+
{
150+
return <build>no ;
151+
}
152+
}
153+
137154
lib boost_stacktrace_from_exception
138155
: # sources
139156
../src/from_exception.cpp
140157
: # requirements
141158
<warnings>all
142159
<target-os>linux:<library>dl
143160

144-
# Command line option to disable build
145-
<boost.stacktrace.from_exception>off:<build>no
161+
# Enable build when explicitly requested, or by default, when on x86
162+
<conditional>@build-stacktrace-from-exception
146163

147164
# Require usable libbacktrace on other platforms
148165
#[ check-target-builds ../build//libbacktrace : : <build>no ]

0 commit comments

Comments
 (0)