From 66ad4dc61d5e188f7cc7042ba02f4a5c0a2a470d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 20 Feb 2023 18:34:40 +0100 Subject: [PATCH] cmake: fix sanitizer detenction on mac --- CMake/CheckDebug.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- 2.30.2