diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-06-14 21:48:43 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-06-15 10:08:43 +0200 |
| commit | 32fa8e40c845755b3b9645fb01b4790e989bf9a9 (patch) | |
| tree | a25a1c7523a99fcc3e930abcf65f336d796a053f /CMakeLists.txt | |
| parent | 02add366d9886dff631de35f64b2a907b6f0f4d2 (diff) | |
| download | kernel-32fa8e40c845755b3b9645fb01b4790e989bf9a9.tar.xz kernel-32fa8e40c845755b3b9645fb01b4790e989bf9a9.zip | |
build: allow disabling of sanitizers
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 394f5bf..5f2ae14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ endif() option(TEACHOS_ENABLE_LINTING "Enable linting during build" ON) option(TEACHOS_GENERATE_DOCS "Generate documentation during build" ON) +option(TEACHOS_ENABLE_TEST_SANITIZERS "Enable sanitizers for test executables" ON) #[============================================================================[ # Global Build System Configuration @@ -106,8 +107,10 @@ if(BUILD_TESTING) ) endif() - add_compile_options("$<$<CXX_COMPILER_ID:GNU>:-fsanitize=undefined,address>") - add_link_options("$<$<CXX_COMPILER_ID:GNU>:-fsanitize=undefined,address>") + if(TEACHOS_ENABLE_TEST_SANITIZERS) + add_compile_options("$<$<CXX_COMPILER_ID:GNU>:-fsanitize=undefined,address>") + add_link_options("$<$<CXX_COMPILER_ID:GNU>:-fsanitize=undefined,address,leak>") + endif() endif() #[============================================================================[ |
