From 8706e3c38bd6b8cc510a952521fc2a336b0602cc Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 26 Jan 2014 14:55:30 +0000 Subject: [PATCH] CMake: Bugfix: Strip leading and trailing whitespace from linker flags in order to not confuse cmake-2.8.8 git-svn-id: https://svn.dealii.org/trunk@32315 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/checks/check_01_cxx_features.cmake | 2 +- deal.II/cmake/setup_cached_variables.cmake | 8 ++++++-- deal.II/doc/news/changes.h | 6 ++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/deal.II/cmake/checks/check_01_cxx_features.cmake b/deal.II/cmake/checks/check_01_cxx_features.cmake index 8c8759fd76..f464702949 100644 --- a/deal.II/cmake/checks/check_01_cxx_features.cmake +++ b/deal.II/cmake/checks/check_01_cxx_features.cmake @@ -254,7 +254,7 @@ IF(DEAL_II_WITH_CXX11 AND NOT DEAL_II_HAVE_CXX11) "or use a different compiler, instead. (If the compiler flag for C++11 " "support differs from \"-std=c++0x\" or \"-std=c++11\", a suitable " "compiler flag has to be specified manually via\n" - " -DDEAL_II_CXX11_FLAG="..."\n\n" + " -DDEAL_II_CXX11_FLAG=\"...\"\n\n" ) ENDIF() diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index 897d36befa..51a3f0bc45 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -304,9 +304,13 @@ ENDFOREACH() # Finally, read in CXXFLAGS and LDFLAGS from environment and prepend them # to the saved variables: # - -SET(CMAKE_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_SAVED}") +# Also strip leading and trailing whitespace from linker flags to make +# old cmake versions happy +# +SET(DEAL_II_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${DEAL_II_CXX_FLAGS_SAVED}") +STRING(STRIP "${DEAL_II_CXX_FLAGS_SAVED}" DEAL_II_CXX_FLAGS_SAVED) SET(DEAL_II_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${DEAL_II_LINKER_FLAGS_SAVED}") +STRING(STRIP "${DEAL_II_LINKER_FLAGS_SAVED}" DEAL_II_LINKER_FLAGS_SAVED) UNSET(ENV{CXXFLAGS}) UNSET(ENV{LDFLAGS}) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 4a94777bb0..86aff38a9f 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -84,6 +84,12 @@ inconvenience this causes.

Specific improvements

    +
  1. Fixed: A regression where a single whitespace accidentally added to + DEAL_II_LINKER_FLAGS internally prevented cmake-2.8.8 from configuring + sucessfully +
    + (Matthias Maier, Krysztof Bzowski 2014/01/26) +
  2. Changed: It was possible to call DoFAccessor::set_active_fe_index() on non-active cells. However, this made no sense: Since degrees of freedoms only exist on active cells -- 2.39.5