diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..623236a --- /dev/null +++ b/build.jam @@ -0,0 +1,50 @@ +# Copyright René Ferdinand Rivera Morell 2023-2024 +# Distributed under 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) + +require-b2 5.2 ; + +constant boost_dependencies : + /boost/config//boost_config + /boost/container_hash//boost_container_hash + /boost/core//boost_core + /boost/predef//boost_predef + windows:/boost/winapi//boost_winapi ; + +project /boost/stacktrace + : common-requirements + include + ; + +explicit + [ alias boost_stacktrace_addr2line : build//boost_stacktrace_addr2line ] + [ alias boost_stacktrace_backtrace : build//boost_stacktrace_backtrace ] + [ alias boost_stacktrace_basic : build//boost_stacktrace_basic ] + [ alias boost_stacktrace_from_exception : build//boost_stacktrace_from_exception ] + [ alias boost_stacktrace_noop : build//boost_stacktrace_noop ] + [ alias boost_stacktrace_windbg : build//boost_stacktrace_windbg ] + [ alias boost_stacktrace_windbg_cached : build//boost_stacktrace_windbg_cached ] + [ alias boost_stacktrace : boost_stacktrace_noop ] + [ alias all : + boost_stacktrace_addr2line + boost_stacktrace_backtrace + boost_stacktrace_basic + boost_stacktrace_from_exception + boost_stacktrace_noop + boost_stacktrace_windbg + boost_stacktrace_windbg_cached + test + ] + ; + +call-if : boost-library stacktrace + : install + boost_stacktrace_addr2line + boost_stacktrace_backtrace + boost_stacktrace_basic + boost_stacktrace_from_exception + boost_stacktrace_noop + boost_stacktrace_windbg + boost_stacktrace_windbg_cached + ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index ceb62ce..9f93887 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -5,14 +5,21 @@ # http://www.boost.org/LICENSE_1_0.txt) # +require-b2 5.0.1 ; +import-search /boost/config/checks ; +import config : requires ; import feature ; import property ; -import ../../config/checks/config : requires ; + +constant boost_dependencies_private : + /boost/assert//boost_assert + ; project - : source-location . + : common-requirements $(boost_dependencies) : requirements [ requires cxx11_rvalue_references ] + $(boost_dependencies_private) : default-build hidden ; @@ -26,10 +33,10 @@ feature.feature boost.stacktrace.from_exception : on off : optional propagated ; local LIBBACKTRACE_PATH = [ modules.peek : LIBBACKTRACE_PATH ] ; lib backtrace - : + : : $(LIBBACKTRACE_PATH)/lib static : - : $(LIBBACKTRACE_PATH)/include + : $(LIBBACKTRACE_PATH)/include ; actions mp_simple_run_action @@ -67,6 +74,7 @@ lib boost_stacktrace_noop : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; lib boost_stacktrace_backtrace @@ -77,10 +85,11 @@ lib boost_stacktrace_backtrace linux:dl backtrace shared:BOOST_STACKTRACE_DYN_LINK=1 - [ check-target-builds ../build//libbacktrace : : no ] + [ check-target-builds libbacktrace : : no ] : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; lib boost_stacktrace_addr2line @@ -90,10 +99,11 @@ lib boost_stacktrace_addr2line all linux:dl shared:BOOST_STACKTRACE_DYN_LINK=1 - [ check-target-builds ../build//addr2line : : no ] + [ check-target-builds addr2line : : no ] : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; lib boost_stacktrace_basic @@ -103,10 +113,11 @@ lib boost_stacktrace_basic all linux:dl shared:BOOST_STACKTRACE_DYN_LINK=1 - [ check-target-builds ../build//WinDbg : no ] + [ check-target-builds WinDbg : no ] : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; lib boost_stacktrace_windbg @@ -116,10 +127,11 @@ lib boost_stacktrace_windbg all Dbgeng ole32 shared:BOOST_STACKTRACE_DYN_LINK=1 - [ check-target-builds ../build//WinDbg : : no ] + [ check-target-builds WinDbg : : no ] : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; lib boost_stacktrace_windbg_cached @@ -129,10 +141,11 @@ lib boost_stacktrace_windbg_cached all Dbgeng ole32 shared:BOOST_STACKTRACE_DYN_LINK=1 - [ check-target-builds ../build//WinDbgCached : : no ] + [ check-target-builds WinDbgCached : : no ] : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; rule build-stacktrace-from-exception ( props * ) @@ -162,10 +175,9 @@ lib boost_stacktrace_from_exception @build-stacktrace-from-exception # Require usable libbacktrace on other platforms - #[ check-target-builds ../build//libbacktrace : : no ] + # [ check-target-builds libbacktrace : : no ] : # default build : # usage-requirements #shared:BOOST_STACKTRACE_DYN_LINK=1 + BOOST_STACKTRACE_NO_LIB=1 ; - -boost-install boost_stacktrace_noop boost_stacktrace_backtrace boost_stacktrace_addr2line boost_stacktrace_basic boost_stacktrace_windbg boost_stacktrace_windbg_cached boost_stacktrace_from_exception ; diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index c170f63..427196c 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -9,9 +9,9 @@ import doxygen ; doxygen autodoc : - [ glob ../../../boost/stacktrace.hpp ] - [ glob ../../../boost/stacktrace/*.hpp ] - [ glob ../../../boost/stacktrace/detail/frame_decl.hpp ] + [ glob ../include/boost/stacktrace.hpp ] + [ glob ../include/boost/stacktrace/*.hpp ] + [ glob ../include/boost/stacktrace/detail/frame_decl.hpp ] : EXTRACT_ALL=NO HIDE_UNDOC_MEMBERS=YES diff --git a/example/user_config.cpp b/example/user_config.cpp index a1403cf..3830ccd 100644 --- a/example/user_config.cpp +++ b/example/user_config.cpp @@ -4,7 +4,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_USER_CONFIG +#define BOOST_USER_CONFIG #include #include // std::set_terminate, std::abort diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index d184940..10542ef 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -5,7 +5,9 @@ # http://www.boost.org/LICENSE_1_0.txt) # -import ../../config/checks/config : requires ; +import-search /boost/config/checks ; +import config : requires ; +import testing ; lib dl : : shared ; lib gcc_s ; @@ -31,6 +33,8 @@ project all always_show_run_output hidden + .. + /boost/optional//boost_optional ; local FORCE_SYMBOL_EXPORT = freebsd:"-rdynamic" solaris:"-Bdynamic" aix:"-rdynamic" @@ -122,15 +126,19 @@ test-suite stacktrace_tests [ run thread_safety_checking.cpp : : : on .//test_impl_lib_backtrace $(LINKSHARED_BT) BOOST_STACKTRACE_BACKTRACE_FORCE_STATIC + /boost/optional//boost_optional : backtrace_lib_threaded_static ] [ run thread_safety_checking.cpp : : : on .//test_impl_lib_windbg $(LINKSHARED_WIND) + /boost/optional//boost_optional : windbg_lib_threaded ] [ run thread_safety_checking.cpp : : : on .//test_impl_lib_windbg_cached $(LINKSHARED_WIND_CACHED) + /boost/optional//boost_optional : windbg_cached_lib_threaded ] [ run thread_safety_checking.cpp : : : on .//test_impl_lib_basic $(LINKSHARED_BASIC) + /boost/optional//boost_optional : basic_lib_threaded ] ##### Tests with disabled debug symbols ##### @@ -158,6 +166,7 @@ test-suite stacktrace_tests [ run thread_safety_checking.cpp : : : off .//test_impl_lib_backtrace_no_dbg + /boost/optional//boost_optional $(LINKSHARED_BT) : backtrace_lib_no_dbg_threaded ] [ run thread_safety_checking.cpp @@ -212,15 +221,15 @@ test-suite stacktrace_tests for local p in [ glob ../example/*.cpp ] { local target_name = $(p[1]:B) ; - local additional_dependency = ; + local additional_dependency = /boost/array//boost_array ; if $(target_name) = "terminate_handler" { - additional_dependency = /boost/filesystem//boost_filesystem /boost/system//boost_system linux:rt ; + additional_dependency += /boost/filesystem//boost_filesystem /boost/system//boost_system linux:rt ; } if $(target_name) = "throwing_st" { - additional_dependency = [ requires rtti ] ; + additional_dependency += [ requires rtti ] /boost/exception//boost_exception ; } stacktrace_tests += [ run $(p) : : : on $(LINKSHARED_BT) $(additional_dependency) : backtrace_$(p2[1]:B) ] ;