]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cmake: check_compiler_setup: move linker flags to correct CMAKE_REQUIRED variable 12568/head
authorMarc Fehling <mafehling.git@gmail.com>
Mon, 12 Jul 2021 22:52:44 +0000 (16:52 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 12 Jul 2021 22:52:44 +0000 (16:52 -0600)
cmake/macros/macro_check_compiler_setup.cmake

index 0f13915e41bf1e6c81ce463a3344479324f7d139..6572e5635687246284421c6e17d950e3fdf1533e 100644 (file)
@@ -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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.