feat: Run tests with sanitizers in CI (#1879)

Fixes #1075
Fixes #1049
This commit is contained in:
Alex Kremer
2025-02-10 16:20:25 +00:00
committed by GitHub
parent 427ba47716
commit f5e6c9576e
16 changed files with 526 additions and 219 deletions

View File

@@ -1,3 +1,10 @@
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_LINK)
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_USE_BACKTRACE)
find_package(libbacktrace REQUIRED CONFIG)
if (Boost_STACKTRACE_FOUND)
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_LINK)
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_USE_BACKTRACE)
find_package(libbacktrace REQUIRED CONFIG)
else ()
# Some sanitizers (TSAN and ASAN for sure) can't be used with libbacktrace because they have their own backtracing
# capabilities and there are conflicts. In any case, this makes sure Clio code knows that backtrace is not available.
# See relevant conan profiles for sanitizers where we disable stacktrace in Boost explicitly.
target_compile_definitions(clio_options INTERFACE CLIO_WITHOUT_STACKTRACE)
endif ()