Skip to content

Commit

Permalink
fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed Oct 17, 2024
1 parent 7386391 commit f8f3d9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f8f3d9b

Please sign in to comment.