Skip to content

Commit 93dc7e5

Browse files
committed
fix(coverage): disabling flags when needed
1 parent 30750ec commit 93dc7e5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

config/cmake/Coverage.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414

1515
include_guard (GLOBAL)
1616

17-
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
17+
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32)
1818
get_cmake_property (debug_configs DEBUG_CONFIGURATIONS)
1919

2020
if (NOT debug_configs)
2121
set (debug_configs Debug)
2222
endif ()
2323

24-
# UBSAN seems to interfere with coverage collection, it erroneously reports 0-4%
25-
list (REMOVE_ITEM debug_configs UBSAN)
24+
if (APPLE)
25+
# On MacOS, UBSAN seems to interfere with coverage collection, it erroneously reports 0-4%,
26+
# so just disable it
27+
list (REMOVE_ITEM debug_configs UBSAN)
28+
endif ()
2629

2730
list (JOIN debug_configs "," debug_configs)
2831

0 commit comments

Comments
 (0)