Skip to content

Commit

Permalink
CMake: add Boost::stacktrace ALIAS target for platform defaults (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
leha-bot authored Jun 20, 2024
1 parent c093aef commit 5747f85
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ stacktrace_add_library(basic ${BOOST_STACKTRACE_ENABLE_BASIC} "" "")
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")


# Alias target for platform defaults (only if they enabled).
if(WIN32)
if(BOOST_STACKTRACE_ENABLE_WINDBG)
add_library(Boost::stacktrace ALIAS Boost::stacktrace_windbg)
endif()
else()
if(BOOST_STACKTRACE_ENABLE_BACKTRACE)
add_library(Boost::stacktrace ALIAS Boost::stacktrace_backtrace)
elseif(BOOST_STACKTRACE_ENABLE_BASIC)
add_library(Boost::stacktrace ALIAS Boost::stacktrace_basic)
endif()
endif()

if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

add_subdirectory(test)
Expand Down

0 comments on commit 5747f85

Please sign in to comment.