From dae2aa841323d6b947ef49604a29c8a4dac5da8c Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 2 Oct 2012 13:09:38 +0000 Subject: [PATCH] Read in compiler/linker flags from environment as well git-svn-id: https://svn.dealii.org/branches/branch_cmake@26926 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_cached_variables.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index c149fc483e..5e221eeaa4 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -95,6 +95,14 @@ FOREACH(flag ${flags}) ENDFOREACH() +# +# Read in CFLAGS, CXXFLAGS and LDFLAGS from environment +# +SET_IF_EMPTY(CMAKE_C_FLAGS "$ENV{CFLAGS}") +SET_IF_EMPTY(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS}") +SET_IF_EMPTY(CMAKE_SHARED_LINKER_FLAGS "$ENV{LDFLAGS}") + + # # Set cached compiler flags to an empty string: # -- 2.39.5