From 726ef581a9a355a3e2752ebb953baedbc0217edc Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 11 Jun 2026 19:51:06 +0200 Subject: build: remove unused variable --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f7c7fe87..40648859 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,6 @@ if (BUILD_TESTING) FetchContent_MakeAvailable("Catch2") add_compile_definitions("CATCH_CONFIG_NO_COUNTER") - set(CATCH_TEST_ARGS "EXTRA_ARGS" "--reporter" "junit::out=junit.xml" "--reporter" "console::out=-::colour-mode=ansi") endif() #[============================================================================[ -- cgit v1.2.3 From 0095db932cec54cd2735f595450fc5131efc0ffb Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sun, 14 Jun 2026 15:48:49 +0200 Subject: tests: globally enable sanitizers --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 40648859..394f5bfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,9 @@ if(BUILD_TESTING) CXX_CLANG_TIDY "" ) endif() + + add_compile_options("$<$:-fsanitize=undefined,address>") + add_link_options("$<$:-fsanitize=undefined,address>") endif() #[============================================================================[ -- cgit v1.2.3 From 32fa8e40c845755b3b9645fb01b4790e989bf9a9 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sun, 14 Jun 2026 21:48:43 +0200 Subject: build: allow disabling of sanitizers --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 394f5bfe..5f2ae141 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("$<$:-fsanitize=undefined,address>") - add_link_options("$<$:-fsanitize=undefined,address>") + if(TEACHOS_ENABLE_TEST_SANITIZERS) + add_compile_options("$<$:-fsanitize=undefined,address>") + add_link_options("$<$:-fsanitize=undefined,address,leak>") + endif() endif() #[============================================================================[ -- cgit v1.2.3