@@ -9,6 +9,7 @@ require-b2 5.0.1 ;
9
9
import-search /boost/config/checks ;
10
10
import boost-stacktrace-features ;
11
11
import config : requires ;
12
+ import configure ;
12
13
import property ;
13
14
14
15
constant boost_dependencies_private :
@@ -66,9 +67,10 @@ explicit WinDbgCached ;
66
67
rule build-stacktrace-noop ( props * )
67
68
{
68
69
local enabled = [ property.select <boost.stacktrace.noop> : $(props) ] ;
69
- if $(enabled:G=) = "off"
70
+ switch $(enabled:G=)
70
71
{
71
- return <build>no ;
72
+ case "on" : return ;
73
+ case "off" : return <build>no ;
72
74
}
73
75
}
74
76
@@ -88,7 +90,13 @@ lib boost_stacktrace_noop
88
90
rule build-stacktrace-backtrace ( props * )
89
91
{
90
92
local enabled = [ property.select <boost.stacktrace.backtrace> : $(props) ] ;
91
- if $(enabled:G=) = "off"
93
+ switch $(enabled:G=)
94
+ {
95
+ case "on" : return ;
96
+ case "off" : return <build>no ;
97
+ }
98
+
99
+ if ! [ configure.builds libbacktrace : $(props) : "boost.stacktrace.backtrace" ]
92
100
{
93
101
return <build>no ;
94
102
}
@@ -103,7 +111,6 @@ lib boost_stacktrace_backtrace
103
111
<library>backtrace
104
112
<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
105
113
<conditional>@build-stacktrace-backtrace
106
- [ check-target-builds libbacktrace : : <build>no ]
107
114
: # default build
108
115
: # usage-requirements
109
116
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
@@ -113,13 +120,20 @@ lib boost_stacktrace_backtrace
113
120
rule build-stacktrace-addr2line ( props * )
114
121
{
115
122
local enabled = [ property.select <boost.stacktrace.addr2line> : $(props) ] ;
116
- if $(enabled:G=) = "off"
123
+ switch $(enabled:G=)
117
124
{
118
- return <build>no ;
125
+ case "on" : return ;
126
+ case "off" : return <build>no ;
119
127
}
120
128
121
129
# Disable by default on Windows when not using Cygwin
122
130
if <target-os>windows in $(props) && ! ( <target-os>cygwin in $(props) )
131
+ {
132
+ configure.log-library-search-result "boost.stacktrace.addr2line" : "no" ;
133
+ return <build>no ;
134
+ }
135
+
136
+ if ! [ configure.builds addr2line : $(props) : "boost.stacktrace.addr2line" ]
123
137
{
124
138
return <build>no ;
125
139
}
@@ -133,7 +147,6 @@ lib boost_stacktrace_addr2line
133
147
<target-os>linux:<library>dl
134
148
<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
135
149
<conditional>@build-stacktrace-addr2line
136
- [ check-target-builds addr2line : : <build>no ]
137
150
: # default build
138
151
: # usage-requirements
139
152
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
@@ -143,7 +156,13 @@ lib boost_stacktrace_addr2line
143
156
rule build-stacktrace-basic ( props * )
144
157
{
145
158
local enabled = [ property.select <boost.stacktrace.basic> : $(props) ] ;
146
- if $(enabled:G=) = "off"
159
+ switch $(enabled:G=)
160
+ {
161
+ case "on" : return ;
162
+ case "off" : return <build>no ;
163
+ }
164
+
165
+ if [ configure.builds WinDbg : $(props) : "boost.stacktrace.basic" ]
147
166
{
148
167
return <build>no ;
149
168
}
@@ -157,7 +176,6 @@ lib boost_stacktrace_basic
157
176
<target-os>linux:<library>dl
158
177
<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
159
178
<conditional>@build-stacktrace-basic
160
- [ check-target-builds WinDbg : <build>no ]
161
179
: # default build
162
180
: # usage-requirements
163
181
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
@@ -167,7 +185,13 @@ lib boost_stacktrace_basic
167
185
rule build-stacktrace-windbg ( props * )
168
186
{
169
187
local enabled = [ property.select <boost.stacktrace.windbg> : $(props) ] ;
170
- if $(enabled:G=) = "off"
188
+ switch $(enabled:G=)
189
+ {
190
+ case "on" : return ;
191
+ case "off" : return <build>no ;
192
+ }
193
+
194
+ if ! [ configure.builds WinDbg : $(props) : "boost.stacktrace.windbg" ]
171
195
{
172
196
return <build>no ;
173
197
}
@@ -181,7 +205,6 @@ lib boost_stacktrace_windbg
181
205
<library>Dbgeng <library>ole32
182
206
<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
183
207
<conditional>@build-stacktrace-windbg
184
- [ check-target-builds WinDbg : : <build>no ]
185
208
: # default build
186
209
: # usage-requirements
187
210
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
@@ -191,7 +214,13 @@ lib boost_stacktrace_windbg
191
214
rule build-stacktrace-windbg-cached ( props * )
192
215
{
193
216
local enabled = [ property.select <boost.stacktrace.windbg_cached> : $(props) ] ;
194
- if $(enabled:G=) = "off"
217
+ switch $(enabled:G=)
218
+ {
219
+ case "on" : return ;
220
+ case "off" : return <build>no ;
221
+ }
222
+
223
+ if ! [ configure.builds WinDbgCached : $(props) : "boost.stacktrace.windbg_cached" ]
195
224
{
196
225
return <build>no ;
197
226
}
@@ -205,7 +234,6 @@ lib boost_stacktrace_windbg_cached
205
234
<library>Dbgeng <library>ole32
206
235
<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
207
236
<conditional>@build-stacktrace-windbg-cached
208
- [ check-target-builds WinDbgCached : : <build>no ]
209
237
: # default build
210
238
: # usage-requirements
211
239
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
@@ -215,16 +243,19 @@ lib boost_stacktrace_windbg_cached
215
243
rule build-stacktrace-from-exception ( props * )
216
244
{
217
245
local enabled = [ property.select <boost.stacktrace.from_exception> : $(props) ] ;
218
- if $(enabled:G=) = "off"
246
+ switch $(enabled:G=)
219
247
{
220
- return <build>no ;
248
+ case "on" : return ;
249
+ case "off" : return <build>no ;
221
250
}
222
251
223
252
local arch = [ property.select <architecture> : $(props) ] ;
224
253
if $(arch) && ( $(arch:G=) != x86 )
225
254
{
255
+ configure.log-library-search-result "boost.stacktrace.from_exception" : "no" ;
226
256
return <build>no ;
227
257
}
258
+ configure.log-library-search-result "boost.stacktrace.from_exception" : "yes" ;
228
259
}
229
260
230
261
lib boost_stacktrace_from_exception
0 commit comments