From: Marc Fehling Date: Mon, 12 Jul 2021 22:52:44 +0000 (-0600) Subject: cmake: check_compiler_setup: move linker flags to correct CMAKE_REQUIRED variable X-Git-Tag: v9.4.0-rc1~1148^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2bb17646e63f9b129ddc75e7dca660cbe0a16a;p=dealii.git cmake: check_compiler_setup: move linker flags to correct CMAKE_REQUIRED variable --- 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()