# BLAS_FOUND
# BLAS_LIBRARIES
# BLAS_LINKER_FLAGS
-# METIS_INCLUDE_DIRS
#
FILE(APPEND ${_log_summary} "${ARGN}")
ENDMACRO()
-
_both(
"###
#
_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()
call the corresponding <code>Find<lib>.cmake</code> module.
Therefore, all information that would be otherwise exported by the
module must be specified by hand. (See the
- <a href="Config.sample" target="_top">Config.sample file</a> for a
+ <a href="config.sample" target="_top">config.sample file</a> for a
detailed list of valid variables per feature.)
</p>
<p>
or by providing an initial cache file, see
<a href="#advanced">advanced setup section</a>.
Possible manual overrides are explained in detail in the
- in the <a href="Config.sample" target="_top">Config.sample file</a>.
+ in the <a href="config.sample" target="_top">config.sample file</a>.
</p>
<a name="advanced"></a>
<h2>Initial cache file and advanced options</h2>
- A sample configuration file for preloading the CMake cache with
+ <p>
+ A sample configuration file for preloading the CMake cache with
<pre class="cmake">
-$ cmake -C Config.sample <...>
+$ cmake -C config.sample <...>
</pre>
- can be found <a href="Config.sample" target="_top">here</a>.
- This sample configuration covers all options mentioned in this
- documentation as well as some advanced aspects in feature
- configuration.
+ can be found <a href="config.sample" target="_top">here</a>.
+ This sample configuration covers all options mentioned in this
+ documentation as well as some advanced aspects in feature
+ configuration.
+ </p>
+ <p>
+ The build system automatically exports a <code>config.camke</code>
+ 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 <code>build</code> next to an empty
+ directory <code>build2</code>:
+<pre class="cmake">
+$ cd build2
+$ cmake -C ../build/config.cmake ../deal.II
+</pre>
+ </p>
<a name="compiling"></a>
<h2> Compiling only certain parts </h2>
-## ##
-# Example configuration file #
-# #
-# See doc/readme.html and doc/users/cmake.html for further #
-# details on how to use the cmake build system of deal.II. #
-## ##
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II Authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# Example configuration file
+#
+# This file can be used as a script to preseed the initial cache of a build
+# directory. To do so, invoke cmake with
+#
+# $ cmake -C configuration.cmake [...]
+#
+#
+# Please note that this file is actually intrepeted as a full featured
+# CMake script file, so in order to set variables in the cache a statement
+# of the form
+#
+# SET(<variable> <value> CACHE <type> "<string>")
+#
+# has to be used. See doc/readme.html and doc/users/cmake.html for further
+# details on how to use the cmake build system of deal.II.
+#
###########################################################################
# "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices."
# )
#
-#
###########################################################################
# "Library suffix for the debug library"
# )
#
-# SET_IF_EMPTY(DEAL_II_RELEASE_SUFFIX "" CACHE STRING
+# SET(DEAL_II_RELEASE_SUFFIX "" CACHE STRING
# "Library suffix for the release library"
# )
#