From 70a2c1beae7de941d5e636f9b188d2de3501b9b2 Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 30 Apr 2013 09:11:08 +0000 Subject: [PATCH] CMake: Fix a typo that prevented user supplied shared linker flags from being used git-svn-id: https://svn.dealii.org/trunk@29405 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_cached_variables.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index 3e6f447bcc..2216232956 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -168,6 +168,8 @@ MARK_AS_ADVANCED(CMAKE_INSTALL_RPATH_USE_LINK_PATH) FOREACH(_flag CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG + SHARED_LINKER_FLAGS_RELEASE + SHARED_LINKER_FLAGS_DEBUG ) IF(NOT "${CMAKE_${_flag}}" STREQUAL "") MESSAGE(FATAL_ERROR @@ -189,6 +191,10 @@ FOREACH(_flag CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO + CMAKE_SHARED_LINKER_FLAGS_DEBUG + CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL + CMAKE_SHARED_LINKER_FLAGS_RELEASE + CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ) # Go away... SET(${_flag} "" CACHE INTERNAL "" FORCE) @@ -230,14 +236,13 @@ FOREACH(_flag ${DEAL_II_USED_FLAGS}) MARK_AS_ADVANCED(${_flag}) ENDFOREACH() - # # Finally, read in CFLAGS, CXXFLAGS and LDFLAGS from environment and # prepend them to the saved variables: # SET(CMAKE_C_FLAGS_SAVED "$ENV{CFLAGS} ${CMAKE_C_FLAGS_SAVED}") SET(CMAKE_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_SAVED}") -SET(CMAKE_SHARED_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS}") +SET(CMAKE_SHARED_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS_SAVED}") UNSET(ENV{CFLAGS}) UNSET(ENV{CXXFLAGS}) UNSET(ENV{LDFLAGS}) -- 2.39.5