Stacktrace module

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-04-29 23:23:20 +03:00
1 parent e7186f17f0
commit f0825fbd1a
13 files changed
+105 -36

No files matched your search

+22 -1
View File
@@ -2,7 +2,28 @@ include(FetchContent)
function(void_fetch_dependency DEP_NAME)
if(DEP_NAME STREQUAL "Boost")
find_package(Boost REQUIRED COMPONENTS stacktrace_backtrace)
if(TARGET Boost::stacktrace_backtrace)
return()
endif()
find_package(Boost QUIET COMPONENTS stacktrace_backtrace)
if(TARGET Boost::stacktrace_backtrace)
return()
endif()
message(STATUS "[Void] Boost::stacktrace_backtrace not found — falling back to FetchContent")
set(BOOST_INCLUDE_LIBRARIES stacktrace CACHE STRING "" FORCE)
set(BOOST_ENABLE_CMAKE ON CACHE BOOL "" FORCE)
FetchContent_Declare(Boost
URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz
URL_HASH SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(Boost)
if(NOT TARGET Boost::stacktrace_backtrace AND TARGET boost_stacktrace_backtrace)
add_library(Boost::stacktrace_backtrace ALIAS boost_stacktrace_backtrace)
endif()
return()
endif()
# FIXME: Add if needed external