Skip to content

Commit fe761d5

Browse files
committed
Run sanitizer single flag checks for all platforms
When checking for the availability of a sanitizer set, it would only run `check_cxx_source_compiles` for the full set of flags, and additionally `check_cxx_compiler_flag` on WIN32. Now, it performs both checks for all platforms.
1 parent dd981c9 commit fe761d5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

sanitizers.cmake

+4-6
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,10 @@ function(test_san_flags RETURN_VAR LINK_OPTIONS)
117117
unset(CMAKE_REQUIRED_FLAGS)
118118
unset(test_san_flags_OPTION_TEST CACHE)
119119
foreach(ARG ${ARGN})
120-
if(WIN32)
121-
unset(test_san_flags_OPTION_TEST CACHE)
122-
check_cxx_compiler_flag(${ARG} test_san_flags_OPTION_TEST)
123-
if(NOT test_san_flags_OPTION_TEST)
124-
break()
125-
endif()
120+
unset(test_san_flags_OPTION_TEST CACHE)
121+
check_cxx_compiler_flag(${ARG} test_san_flags_OPTION_TEST)
122+
if(NOT test_san_flags_OPTION_TEST)
123+
break()
126124
endif()
127125
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${ARG}")
128126
endforeach()

0 commit comments

Comments
 (0)