From: Matthias Maier
Date: Thu, 15 May 2014 16:14:47 +0000 (+0000)
Subject: CMake: Remove dump-cache feature.
X-Git-Tag: v8.2.0-rc1~501
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f392fd310f1042dcff7073272f274fcbbcbfe600;p=dealii.git
CMake: Remove dump-cache feature.
CMake-2.12* is able to read in a CMakeCache.txt file directly, so remove
this horrible code
git-svn-id: https://svn.dealii.org/trunk@32905 0785d39b-7218-0410-832d-ea1e28bc413d
---
diff --git a/deal.II/cmake/setup_write_config.cmake b/deal.II/cmake/setup_write_config.cmake
index 6acc88aefa..38c0351535 100644
--- a/deal.II/cmake/setup_write_config.cmake
+++ b/deal.II/cmake/setup_write_config.cmake
@@ -138,11 +138,6 @@ ENDIF()
_both("DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n")
-#
-# Cache for quicker access to avoid the O(n^2) complexity of a loop over
-# _all_ defined variables.
-#
-
GET_CMAKE_PROPERTY(_variables VARIABLES)
FOREACH(_var ${_variables})
IF(_var MATCHES "DEAL_II_WITH")
@@ -239,50 +234,3 @@ ENDIF()
_summary(" to print a help message with a list of top level targets\n")
_both("#\n###")
-
-
-########################################################################
-# #
-# Dump the cache into config.cmake: #
-# #
-########################################################################
-
-SET(_config_cmake "${CMAKE_BINARY_DIR}/config.cmake")
-FILE(WRITE ${_config_cmake}
-"#
-# This is a raw CMake cache dump of this build directory suitable as an
-# initial cache file: Use this file to preseed a CMake cache in an empty
-# build directory by (note that it is still necessary to declare a source
-# directory):
-# $ cmake -C [...]/config.cmake ../deal.II
-#
-# If you want to have a clean configuration file have a look at
-# doc/users/config.sample
-#\n"
- )
-
-FUNCTION(_config _var)
- # It is absolutely beyond my comprehension why on earth there is
- # hardcoded logic built into CMake to throw an error if one uses
- # uppercase variants of FindPACKAGE call variables...
- IF(NOT _var MATCHES "BOOST_DIR")
- UNSET(${_var})
- ENDIF()
- #
- # We have to get down to the raw entry in the cache, therefore clear the
- # current value (and do it in a function to get private scope):
- #
- FILE(APPEND ${_config_cmake}
- "SET(${_var} \"${${_var}}\" CACHE STRING \"\")\n"
- )
-ENDFUNCTION()
-
-GET_CMAKE_PROPERTY(_variables CACHE_VARIABLES)
-FOREACH(_var
- CMAKE_C_COMPILER
- CMAKE_CXX_COMPILER
- CMAKE_Fortran_COMPILER
- ${_variables}
- )
- _config(${_var})
-ENDFOREACH()
diff --git a/deal.II/doc/users/cmake.html b/deal.II/doc/users/cmake.html
index 04615c21c5..7bc712f4f9 100644
--- a/deal.II/doc/users/cmake.html
+++ b/deal.II/doc/users/cmake.html
@@ -978,18 +978,6 @@ $ cmake -C config.sample <...>
configuration.
-
- The build system automatically exports a config.camke
- into the binary directory that can be used to conveniently clone a
- build directories cache entries, e.g. assuming that there is a
- configured build directory build
next to an empty
- directory build2
:
-
-$ cd build2
-$ cmake -C ../build/config.cmake ../deal.II
-
-
-
Compiling only certain parts