allow sanitizers also be active for force style test codes

This commit is contained in:
Axel Kohlmeyer
2020-06-18 12:39:23 -04:00
parent 8816d7fe3e
commit 786473a189

View File

@ -15,6 +15,11 @@ if(BUILD_MPI)
else()
target_link_libraries(style_tests PUBLIC mpi_stubs)
endif()
# propagate sanitizer options to test tools
if (NOT ENABLE_SANITIZER STREQUAL "none")
target_compile_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
target_link_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
endif()
# unit test for error stats class
add_executable(test_error_stats test_error_stats.cpp)