Skip to content

Commit ce58ebc

Browse files
Copilot0xrinegade
andcommitted
Fix Windows sanitizer build failure: exclude sanitizers on Windows platforms
Co-authored-by: 0xrinegade <[email protected]>
1 parent 2402c08 commit ce58ebc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpp_sdk/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang
3030
add_link_options(--coverage)
3131
endif()
3232

33-
# Enable sanitizers if requested
34-
if(ENABLE_SANITIZERS)
33+
# Enable sanitizers if requested (not supported on Windows/MinGW)
34+
if(ENABLE_SANITIZERS AND NOT WIN32)
3535
add_compile_options(-fsanitize=address,undefined -fno-omit-frame-pointer)
3636
add_link_options(-fsanitize=address,undefined)
3737
endif()
@@ -194,7 +194,7 @@ add_custom_target(docs
194194
)
195195

196196
# Memory safety targets
197-
if(ENABLE_SANITIZERS)
197+
if(ENABLE_SANITIZERS AND NOT WIN32)
198198
add_custom_target(test-sanitizers
199199
COMMAND ${CMAKE_CTEST_COMMAND} --verbose
200200
COMMENT "Running tests with sanitizers"

0 commit comments

Comments
 (0)