From 49f63cd78932d4e0c410270388cf38fbdd5e5ac5 Mon Sep 17 00:00:00 2001 From: David Ockey Date: Sat, 8 Apr 2023 04:52:39 -0500 Subject: [PATCH] Added sanitization fix for MinGW (#684) --- test/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0cc34109..b806929e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -323,16 +323,24 @@ target_link_libraries(etl_tests PRIVATE UnitTestpp) if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) target_compile_options(etl_tests PRIVATE - -fsanitize=address,undefined,bounds -fno-omit-frame-pointer -Wall -Wextra -Werror ) - target_link_options(etl_tests + + # MinGW doesn't presently support sanitization + if (NOT MINGW) + target_compile_options(etl_tests PRIVATE -fsanitize=address,undefined,bounds ) + + target_link_options(etl_tests + PRIVATE + -fsanitize=address,undefined,bounds + ) + endif() endif () # Enable the 'make test' CMake target using the executable defined above