From 57a7bd7186df2aa8bddef3be5912d9653a7199bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 26 Apr 2021 20:16:55 -0400 Subject: [PATCH] adjust for changed CMake variable scope due to moving script code --- unittest/force-styles/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/force-styles/CMakeLists.txt b/unittest/force-styles/CMakeLists.txt index 60e83e7e16..2c0977397a 100644 --- a/unittest/force-styles/CMakeLists.txt +++ b/unittest/force-styles/CMakeLists.txt @@ -33,7 +33,7 @@ else() target_link_libraries(style_tests PUBLIC mpi_stubs) endif() # propagate sanitizer options to test tools -if (NOT ENABLE_SANITIZER STREQUAL "none") +if (ENABLE_SANITIZER AND (NOT ENABLE_SANITIZER STREQUAL "none")) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) target_compile_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER}) target_link_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})