test: skip UBSan flags on Windows clang-cl/MinGW builds

This commit is contained in:
rootvector2 2026-05-28 12:09:13 +05:30
parent 079a9f98d2
commit df70d1a236
1 changed files with 1 additions and 1 deletions

View File

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