# Copyright (C) 2016, Antony Polukhin.
#
# Use, modification and distribution is subject to the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
project boost/stacktrace ;
lib dl ;
lib unwind : : shared ;
actions mp_simple_run_action
{
$(>) > $(<)
}
rule mp-run-simple ( sources + : args * : input-files * : requirements * : target-name )
{
exe $(target-name)_exe : $(sources) : $(requirements) ;
explicit $(target-name)_exe ;
make $(target-name).output : $(target-name)_exe : @mp_simple_run_action ;
explicit $(target-name).output ;
alias $(target-name) : $(target-name).output ;
}
mp-run-simple has_libunwind.cpp : : : : has_libunwind ;
explicit has_libunwind ;
mp-run-simple has_backtrace.cpp : : : : has_backtrace ;
explicit has_backtrace ;
mp-run-simple has_windbg.cpp : : : : has_windbg ;
explicit has_windbg ;
lib boost_stacktrace_libunwind
: # sources
../src/stacktrace.cpp
: # requirements
all
static
BOOST_STACKTRACE_USE_LIBUNWIND=1
unwind
[ check-target-builds ../build//has_libunwind "has libunwind" : : no ]
: # default build
: # usage-requirements
shared:BOOST_TEST_DYN_LINK=1
;
boost-install boost_stacktrace_libunwind ;
lib boost_stacktrace_backtrace
: # sources
../src/stacktrace.cpp
: # requirements
all
BOOST_STACKTRACE_USE_BACKTRACE=1
dl
[ check-target-builds ../build//has_backtrace "has ::backtrace()" : : no ]
: # default build
: # usage-requirements
shared:BOOST_TEST_DYN_LINK=1
;
boost-install boost_stacktrace_backtrace ;
lib boost_stacktrace_windbg
: # sources
../src/stacktrace.cpp
: # requirements
all
BOOST_STACKTRACE_USE_WINDBG=1
[ check-target-builds ../build//has_windbg "has WinDbg" : : no ]
: # default build
: # usage-requirements
shared:BOOST_TEST_DYN_LINK=1
;
boost-install boost_stacktrace_windbg ;