chore(build): use target-specific directives when enabling ASan

This commit is contained in:
fallenoak 2025-12-26 14:06:15 -06:00
parent 5157c414f5
commit a5c589f5a9
3 changed files with 5 additions and 7 deletions

View file

@ -65,4 +65,7 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
include(CodeCoverage)
target_compile_options(${PROJECT_NAME} PRIVATE -g -fprofile-arcs -ftest-coverage -O0)
# Enable ASan for debug builds on gcc
target_compile_options(storm PRIVATE -fsanitize=address -fno-omit-frame-pointer)
endif()