From df70d1a236854f57d68927565fe23e82c1186536 Mon Sep 17 00:00:00 2001 From: rootvector2 Date: Thu, 28 May 2026 12:09:13 +0530 Subject: [PATCH] test: skip UBSan flags on Windows clang-cl/MinGW builds --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0add149..f97f283 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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")