From: Matthias Maier Date: Tue, 19 Mar 2019 21:37:34 +0000 (-0500) Subject: CMake: also update BASE_LINKER_FLAGS* when dropping -fuse-ld=... X-Git-Tag: v9.1.0-rc1~269^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7839%2Fhead;p=dealii.git CMake: also update BASE_LINKER_FLAGS* when dropping -fuse-ld=... --- diff --git a/cmake/setup_finalize.cmake b/cmake/setup_finalize.cmake index 1df5d7b271..716093a7b3 100644 --- a/cmake/setup_finalize.cmake +++ b/cmake/setup_finalize.cmake @@ -99,12 +99,14 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) "Unable to compile a simple test program. " "Trying to drop \"${_linker_flag}\" from the linker flags." ) - STRING(REPLACE "${_linker_flag}" "${_replacement_flag}" - DEAL_II_LINKER_FLAGS "${DEAL_II_LINKER_FLAGS}" - ) - STRING(REPLACE "${_linker_flag}" "${_replacement_flag}" - DEAL_II_LINKER_FLAGS_${build} "${DEAL_II_LINKER_FLAGS_${_build}}" - ) + FOREACH(_flags + DEAL_II_LINKER_FLAGS DEAL_II_LINKER_FLAGS_${build} + BASE_LINKER_FLAGS BASE_LINKER_FLAGS_${build} + ) + STRING(REPLACE "${_linker_flag}" "${_replacement_flag}" + ${_flags} "${${_flags}}" + ) + ENDFOREACH() SET(${_variable} FALSE CACHE INTERNAL "" FORCE) SET(${_variable} FALSE) ENDMACRO()