diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 29bda50c0..9281d1811 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,7 +17,7 @@ if (NOT N EQUAL 0) ) endif () -option(KAMPING_TEST_ENABLE_SANITIZERS "Enable undefined behavior sanitizer and address sanitizer." ON) +option(KAMPING_TEST_ENABLE_SANITIZERS "Enable undefined behavior sanitizer and address sanitizer." OFF) # Registering tests without MPI: kamping_register_test(test_checking_casts FILES checking_casts_test.cpp) diff --git a/tests/cmake/KampingTestHelper.cmake b/tests/cmake/KampingTestHelper.cmake index ca8d41434..ab399a860 100644 --- a/tests/cmake/KampingTestHelper.cmake +++ b/tests/cmake/KampingTestHelper.cmake @@ -24,7 +24,7 @@ function (kamping_register_test KAMPING_TARGET_NAME) add_executable(${KAMPING_TARGET_NAME} ${KAMPING_FILES}) target_link_libraries(${KAMPING_TARGET_NAME} PRIVATE gtest gtest_main gmock kamping_base) target_compile_options(${KAMPING_TARGET_NAME} PRIVATE ${KAMPING_WARNING_FLAGS}) - gtest_discover_tests(${KAMPING_TARGET_NAME} WORKING_DIRECTORY ${PROJECT_DIR}) + gtest_discover_tests(${KAMPING_TARGET_NAME} WORKING_DIRECTORY ${PROJECT_DIR} DISCOVERY_MODE PRE_TEST) kamping_set_kassert_flags(${KAMPING_TARGET_NAME} ${ARGN}) if (NOT ${KAMPING_NO_GLIBCXX_DEBUG_CONTAINERS}) target_compile_definitions(${KAMPING_TARGET_NAME} PRIVATE -D_GLIBCXX_DEBUG)