Skip to content

Commit

Permalink
Add a conditional rule for enabling boost_stacktrace_from_exception. F…
Browse files Browse the repository at this point in the history
…ixes #165. (#166)
  • Loading branch information
pdimov authored May 27, 2024
1 parent 39afcef commit 2c83563
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

import feature ;
import property ;
import ../../config/checks/config : requires ;

project
Expand Down Expand Up @@ -134,15 +135,31 @@ lib boost_stacktrace_windbg_cached
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
;

rule build-stacktrace-from-exception ( props * )
{
local enabled = [ property.select <boost.stacktrace.from_exception> : $(props) ] ;
switch $(enabled:G=)
{
case "on" : return ;
case "off" : return <build>no ;
}

local arch = [ property.select <architecture> : $(props) ] ;
if $(arch) && ( $(arch:G=) != x86 )
{
return <build>no ;
}
}

lib boost_stacktrace_from_exception
: # sources
../src/from_exception.cpp
: # requirements
<warnings>all
<target-os>linux:<library>dl

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

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

0 comments on commit 2c83563

Please sign in to comment.