mirror of https://github.com/jarro2783/cxxopts.git
test: skip UBSan flags on Windows clang-cl/MinGW builds
This commit is contained in:
parent
079a9f98d2
commit
df70d1a236
|
|
@ -29,7 +29,7 @@ add_test(options_no_regex options_test_noregex)
|
|||
|
||||
# Run the parser tests under UBSan so undefined behaviour in integer parsing
|
||||
# (e.g. std::abs(INT64_MIN)) fails the build instead of going unnoticed.
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" AND NOT WIN32)
|
||||
foreach(test_target options_test options_test_noregex)
|
||||
target_compile_options(${test_target} PRIVATE -fsanitize=undefined -fno-sanitize-recover=undefined)
|
||||
set_target_properties(${test_target} PROPERTIES LINK_FLAGS "-fsanitize=undefined -fno-sanitize-recover=undefined")
|
||||
|
|
|
|||
Loading…
Reference in New Issue