Added sanitization fix for MinGW (#684)

This commit is contained in:
David Ockey 2023-04-08 04:52:39 -05:00 committed by GitHub
parent b591ef9184
commit 49f63cd789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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