From: Michael Wallner Date: Mon, 20 Feb 2023 17:34:40 +0000 (+0100) Subject: cmake: fix sanitizer detenction on mac X-Git-Tag: 1.1.4~16 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=66ad4dc61d5e188f7cc7042ba02f4a5c0a2a470d;p=awesomized%2Flibmemcached cmake: fix sanitizer detenction on mac --- diff --git a/CMake/CheckDebug.cmake b/CMake/CheckDebug.cmake index fb188529..a280d16a 100644 --- a/CMake/CheckDebug.cmake +++ b/CMake/CheckDebug.cmake @@ -15,7 +15,7 @@ macro(check_sanitizer VAR NAME LIB) if(${NAME} IN_LIST ${VAR} OR ${LIB} IN_LIST ${VAR}) make_have_identifier(${LIB} HAVE) cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_LIBRARIES ${LIB}) + set(CMAKE_REQUIRED_LIBRARIES -fsanitize=${NAME}) check_cxx_compiler_flag(-fsanitize=${NAME} ${HAVE}) cmake_pop_check_state() if(${HAVE})