From f8f3d9b4b2311ba78ba6d207ab7f587414b7616d Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Thu, 17 Oct 2024 11:19:50 +0300 Subject: [PATCH] fix attempt --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1305295..81f7620 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,28 +114,30 @@ target_include_directories(boost_stacktrace INTERFACE include) if(BOOST_STACKTRACE_ENABLE_WINDBG) target_link_libraries(boost_stacktrace INTERFACE Boost::stacktrace_windbg) + stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS} Boost::stacktrace_windbg" "") elseif(BOOST_STACKTRACE_ENABLE_BACKTRACE) target_link_libraries(boost_stacktrace INTERFACE Boost::stacktrace_backtrace) + stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS} Boost::stacktrace_backtrace" "") elseif(BOOST_STACKTRACE_ENABLE_ADDR2LINE) target_link_libraries(boost_stacktrace INTERFACE Boost::stacktrace_addr2line) + stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS} Boost::stacktrace_addr2line" "") elseif(BOOST_STACKTRACE_ENABLE_BASIC) target_link_libraries(boost_stacktrace INTERFACE Boost::stacktrace_basic) + stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS} Boost::stacktrace_basic" "") elseif(BOOST_STACKTRACE_ENABLE_NOOP) target_link_libraries(boost_stacktrace INTERFACE Boost::stacktrace_noop) + stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS} Boost::stacktrace_noop" "") endif() -# Boost::stacktrace_from exception is not linked by default -stacktrace_add_library(from_exception ${BOOST_STACKTRACE_ENABLE_FROM_EXCEPTION} "${CMAKE_DL_LIBS} boost_stacktrace" "") - # if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")