From b60f1e85eccf23bb1b1cef8733714c3a18ff59a2 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Mon, 12 Jul 2021 16:52:44 -0600 Subject: [PATCH] cmake: check_compiler_setup: move linker flags to correct CMAKE_REQUIRED variable PR: #12568 --- cmake/macros/macro_check_compiler_setup.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/macros/macro_check_compiler_setup.cmake b/cmake/macros/macro_check_compiler_setup.cmake index 0f13915e41..6572e56356 100644 --- a/cmake/macros/macro_check_compiler_setup.cmake +++ b/cmake/macros/macro_check_compiler_setup.cmake @@ -67,8 +67,8 @@ MACRO(CHECK_COMPILER_SETUP _compiler_flags_unstr _linker_flags_unstr _var) ) SET(CACHED_${_var}_ARGN "${ARGN}" CACHE INTERNAL "" FORCE) - SET(CMAKE_REQUIRED_FLAGS ${_compiler_flags}) - SET(CMAKE_REQUIRED_LIBRARIES ${_linker_flags} ${ARGN}) + SET(CMAKE_REQUIRED_FLAGS "${_compiler_flags} ${_linker_flags}") + SET(CMAKE_REQUIRED_LIBRARIES ${ARGN}) CHECK_CXX_SOURCE_COMPILES("int main(){ return 0; }" ${_var}) RESET_CMAKE_REQUIRED() -- 2.39.5