diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 530bf8e..247de78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,14 +273,28 @@ endif() option(BRUSSEL_ENABLE_ASAN "Enable AddressSanitizer or not." OFF) if(BRUSSEL_ENABLE_ASAN) - target_compile_options(30-game - PRIVATE + # Shared to all downstream targets + target_compile_options(10-common + INTERFACE -fsanitize=address -fno-omit-frame-pointer ) - target_link_options(30-game - PRIVATE + target_link_options(10-common + INTERFACE -fsanitize=address -fno-omit-frame-pointer ) endif() + +option(BRUSSEL_ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer or not." OFF) +if(BRUSSEL_ENABLE_UBSAN) + # Shared to all downstream targets + target_compile_options(10-common + INTERFACE + -fsanitize=undefined + ) + target_link_options(10-common + INTERFACE + -fsanitize=undefined + ) +endif() |