From 7b2bb17646e63f9b129ddc75e7dca660cbe0a16a 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 --- 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