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.3.3~4^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b60f1e85eccf23bb1b1cef8733714c3a18ff59a2;p=dealii.git cmake: check_compiler_setup: move linker flags to correct CMAKE_REQUIRED variable PR: #12568 --- 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()