From 088bf8ed7f4a6ca59c96bdb54cf88f1a0dda2ebf Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Thu, 17 Oct 2024 11:57:19 +0300 Subject: [PATCH] Fix stacktrace_from_exception CMake builds (#191) --- CMakeLists.txt | 8 ++------ src/from_exception.cpp | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2faafce..9c5bf84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,6 @@ stacktrace_add_library(addr2line ${BOOST_STACKTRACE_ENABLE_ADDR2LINE} "${CMAKE_D stacktrace_add_library(basic ${BOOST_STACKTRACE_ENABLE_BASIC} "${CMAKE_DL_LIBS}" "") stacktrace_add_library(windbg ${BOOST_STACKTRACE_ENABLE_WINDBG} "dbgeng;ole32" "_GNU_SOURCE=1") stacktrace_add_library(windbg_cached ${BOOST_STACKTRACE_ENABLE_WINDBG_CACHED} "dbgeng;ole32" "_GNU_SOURCE=1") -stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS}" "") # boost_stacktrace, default library @@ -134,11 +133,8 @@ elseif(BOOST_STACKTRACE_ENABLE_NOOP) endif() -if(BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION) - - target_link_libraries(boost_stacktrace INTERFACE Boost::stacktrace_from_exception) - -endif() +# Boost::stacktrace_from_exception is never the default +stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS};boost_stacktrace" "") # diff --git a/src/from_exception.cpp b/src/from_exception.cpp index 7b8f937..f6cb39c 100644 --- a/src/from_exception.cpp +++ b/src/from_exception.cpp @@ -4,8 +4,6 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS - #if defined(_MSC_VER) #include