]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Big Cleanup and reorganization
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 1 Oct 2012 13:15:13 +0000 (13:15 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 1 Oct 2012 13:15:13 +0000 (13:15 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26895 0785d39b-7218-0410-832d-ea1e28bc413d

17 files changed:
deal.II/CMakeLists.txt
deal.II/README.CMAKE
deal.II/bundled/CMakeLists.txt
deal.II/cmake/configure/configure_1_lapack.cmake
deal.II/cmake/configure/configure_1_mpi.cmake
deal.II/cmake/configure/configure_1_tbb.cmake
deal.II/cmake/configure/configure_arpack.cmake
deal.II/cmake/configure/configure_boost.cmake
deal.II/cmake/configure/configure_doxygen.cmake
deal.II/cmake/configure/configure_functionparser.cmake
deal.II/cmake/configure/configure_metis.cmake
deal.II/cmake/configure/configure_netcdf.cmake
deal.II/cmake/configure/configure_p4est.cmake
deal.II/cmake/configure/configure_petsc.cmake
deal.II/cmake/configure/configure_trilinos.cmake
deal.II/cmake/configure/configure_umfpack.cmake
deal.II/cmake/setup_deal_ii.cmake

index 62544e0f4d2f916ad94d4fe40bf862191bc023ea..fc3311629c5e55a8758beeaa52e6ea25fce03bf7 100644 (file)
@@ -1,6 +1,4 @@
 
-SET(VERSION "8.0.pre")
-
 ###########################################################################
 ##                                                                       ##
 ##  See README.cmake for further details on how to use the cmake build   ##
@@ -17,145 +15,14 @@ SET(VERSION "8.0.pre")
 #
 
 
-###########################################################################
-#                                                                         #
-#                     General configuration options:                      #
-#                                                                         #
-###########################################################################
-
-#
-# Feature selection: external libraries and where to take them (if there
-# is a choice, e.g. from bundled vs external)
-#
-
-OPTION(DEAL_II_FEATURE_AUTODETECTION
-# Enables feature autodetection. This will automatically overwrite all
-# DEAL_II_WITH_<...> toggles depending on whether they can be supported or
-# not.
-# Short description:
-  "Enables feature autodetection. This will automatically set DEAL_II_WITH_<...> options."
-  ON)
-
-OPTION(DEAL_II_ALLOW_BUNDLED
-#  Allow the use of bundled libraries bundled with the source tarball.
-#  Note: If set to off DEAL_II_FORCE_BUNDLED* will still pull in bundled
-#  packages, so to ensure that only external libraries are used
-#  DEAL_II_ALLOW_BUNDLED as well as all DEAL_II_FORCE_BUNDLED* have to be
-#  OFF
-# Short description:
-  "Allow the use of libraries bundled with the source tarball. (DEAL_II_FORCE_BUNDLED* will overwrite this option.)"
-  OFF)
-
-OPTION(DEAL_II_WITH_ARPACK
-  "Build deal.II with support for ARPACK."
-  OFF)
-
-SET(DEAL_II_WITH_BOOST
-  # Always true. We need it :-]
-  ON
-  CACHE BOOL "Build deal.II with support for boost." FORCE
-  )
-OPTION(DEAL_II_FORCE_BUNDLED_BOOST
-  "Always use the bundled boost library instead of an external one."
-  OFF)
-
-OPTION(DEAL_II_WITH_DOXYGEN
-  "Build deal.II with support for doxygen and dot."
-  OFF)
-
-OPTION(DEAL_II_WITH_FUNCTIONPARSER
-  "Build deal.II with support for functionparser."
-  OFF)
-OPTION(DEAL_II_FORCE_BUNDLED_FUNCTIONPARSER
-  "Always use the bundled functionparser library instead of an external one."
-  ON)
-
-OPTION(DEAL_II_WITH_LAPACK
-  "Build deal.II with support for LAPACK."
-  OFF)
-
-OPTION(DEAL_II_WITH_METIS
-  "Build deal.II with support for Metis."
-  OFF)
-
-OPTION(DEAL_II_WITH_MPI
-  "Build deal.II with support for mpi."
-  OFF)
-
-OPTION(DEAL_II_WITH_NETCDF
-  "Build deal.II with support for netcdf."
-  OFF)
-
-OPTION(DEAL_II_WITH_P4EST
-  "Build deal.II with support for p4est."
-  OFF)
-
-OPTION(DEAL_II_WITH_PETSC
-  "Build deal.II with support for petsc."
-  OFF)
-
-OPTION(DEAL_II_WITH_TBB
-  "Build deal.II with support for tbb. This will enable thread support in deal.II."
-  OFF)
-OPTION(DEAL_II_FORCE_BUNDLED_TBB
-  "Always use the bundled tbb library instead of an external one."
-  OFF)
-
-OPTION(DEAL_II_WITH_TRILINOS
-  "Build deal.II with support for trilinos."
-  OFF)
-
-OPTION(DEAL_II_WITH_UMFPACK
-  "Build deal.II with support for UMFPACK."
-  OFF)
-OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK
-  "Always use the bundled umfpack library instead of an external one."
-  OFF)
-
-OPTION(DEAL_II_WITH_ZLIB
-  "Build deal.II with support for zlib."
-  OFF)
-
-#
-# Build configuration: configuration options regarding compilation and
-# installation of the deal.II library
-#
-
-OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
-  "configure sensible default CFLAGS and CXXFLAGS depending on platform, compiler and build target."
-  ON)
-
-#
-# Component selection: configuration options regarding the setup of
-# different components of the deal.II library
-#
-
-OPTION(DEAL_II_COMPONENT_EXAMPLES
-  "Enable configuration and installation of the example steps. This adds a COMPONENT \"examples\" to the build system."
-  ON)
-
-OPTION(DEAL_II_COMPONENT_DOCUMENTATION
-  "Enable configuration, build and installation of the documentation. This adds a COMPONENT \"documentation\" to the build system."
-  OFF)
-
-OPTION(DEAL_II_COMPONENT_COMPAT_FILES
-  "Enable installation of the example steps. This adds a COMPONENT \"compat_files\" to the build system."
-  ON)
-
-OPTION(DEAL_II_COMPONENT_PROJECT_CONFIG
-  # Enable configuration and installation of a cmake project config.
-  # Useful for autodetection ( FIND_PACKAGE(DEAL_II) ) of the deal.II
-  # library out of cmake build systems.
-  "Enable configuration and installation of a cmake project config. This adds a COMPONENT \"project_config\" to the build system."
-  ON)
-
-
 ###########################################################################
 #                                                                         #
 #                             Configuration:                              #
 #                                                                         #
 ###########################################################################
 
+SET(VERSION "8.0.pre")
+
 #
 # General configuration for cmake:
 #
@@ -179,14 +46,12 @@ ENDFOREACH()
 
 INCLUDE(setup_external_macros)
 
-
 #
 # We have to initialize some cached variables before PROJECT is called, so
 # do it at this point:
 #
 INCLUDE(setup_cached_variables)
 
-
 #
 # Now, set the project and setup the rest:
 #
@@ -195,7 +60,6 @@ INCLUDE(setup_deal_ii)
 
 INCLUDE(setup_compiler_flags)
 
-
 #
 # Run all system checks:
 #
@@ -205,6 +69,12 @@ FOREACH(file ${check_files})
   INCLUDE(${file})
 ENDFOREACH()
 
+#
+# Include information about bundled libraries:
+#
+IF(DEAL_II_WITH_BUNDLED_DIRECTORY)
+  INCLUDE(bundled/CMakeLists.txt)
+ENDIF()
 
 #
 # Feature configuration:
@@ -218,14 +88,12 @@ FOREACH(file ${configure_files})
   INCLUDE(${file})
 ENDFOREACH()
 
-
 #
 # Finalize the configuration:
 #
 INCLUDE(setup_finalize)
 
 
-
 ###########################################################################
 #                                                                         #
 #                    Compile and install the library:                     #
@@ -239,21 +107,22 @@ ADD_SUBDIRECTORY(config)
 ADD_SUBDIRECTORY(scripts)
 ADD_SUBDIRECTORY(include)
 
-
 #
 # Compile and install the library:
 #
-ADD_SUBDIRECTORY(bundled)
+IF(DEAL_II_WITH_BUNDLED_DIRECTORY)
+  ADD_SUBDIRECTORY(bundled)
+ENDIF()
 ADD_SUBDIRECTORY(source)
 
-
 #
 # Prepare some directories for installation
 #
-ADD_SUBDIRECTORY(doc)
+IF(DEAL_II_WITH_DOC_DIRECTORY)
+  ADD_SUBDIRECTORY(doc)
+ENDIF()
 ADD_SUBDIRECTORY(examples)
 
-
 #
 # Define some custom targets for convenience
 #
index 06581de7480e78962062bfc13ff2296e0438b246..325007fbcef696ded53b1fad264ac1b169e16a75 100644 (file)
@@ -398,6 +398,7 @@ CONFIGURATION
       DEAL_II_CMAKE_MACROS_RELDIR
       DEAL_II_DOCUMENTATION_RELDIR
       DEAL_II_EXAMPLES_RELDIR
+      DEAL_II_EXECUTABLE_RELDIR
       DEAL_II_INCLUDE_RELDIR
       DEAL_II_LIBRARY_RELDIR
       DEAL_II_PROJECT_CONFIG_RELDIR
index 81018041559dbb68588803758bad3fc4cb59d00e..70dc5344e8bffd8d9c2864a199ece0758a87cad3 100644 (file)
@@ -1,15 +1,17 @@
-
 #
-# TODO:
-# The corresponding <feature>_folder and <feature_HAVE_BUNDLED variables
-# are set under cmake/configure/configure_*. This is a bit unfortunate and
-# should be corrected.
+# Export information about bundled library locations and do the actual
+# setup of compilation targets and installation here:
 #
 
-IF(FEATURE_TBB_BUNDLED_CONFIGURED)
-  ADD_SUBDIRECTORY(${tbb_folder}/src)
-ENDIF()
 
+#
+# Boost C++ libraries
+#
+SET(FEATURE_BOOST_HAVE_BUNDLED TRUE)
+OPTION(DEAL_II_FORCE_BUNDLED_BOOST
+  "Always use the bundled boost library instead of an external one."
+  OFF)
+SET(BOOST_FOLDER "${CMAKE_SOURCE_DIR}/bundled/boost-1.49.0")
 
 IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
   INSTALL(DIRECTORY ${boost_folder}/include/boost
@@ -19,7 +21,7 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
     PATTERN ".svn" EXCLUDE
     )
 
-  ADD_SUBDIRECTORY(${boost_folder}/libs/serialization/src)
+  ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/serialization/src)
 
   IF( DEAL_II_USE_MT AND NOT DEAL_II_CAN_USE_CXX11)
     #
@@ -29,18 +31,50 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
     # we don't have to build BOOST itself only to get at this small part of
     # it. it also ensures that we use the correct compiler and flags
     #
-    ADD_SUBDIRECTORY(${boost_folder}/libs/thread/src)
+    ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/thread/src)
   ENDIF()
 ENDIF()
 
 
+#
+# FunctionParser project:
+#
+SET(FEATURE_FUNCTIONPARSER_HAVE_BUNDLED TRUE)
+OPTION(DEAL_II_FORCE_BUNDLED_FUNCTIONPARSER
+  "Always use the bundled functionparser library instead of an external one."
+  ON)
+SET(FUNCTIONPARSER_FOLDER "${CMAKE_SOURCE_DIR}/bundled/functionparser/")
+
 IF(FEATURE_FUNCTIONPARSER_BUNDLED_CONFIGURED)
-  ADD_SUBDIRECTORY(${functionparser_folder})
+  ADD_SUBDIRECTORY(${FUNCTIONPARSER_PROJECT})
+ENDIF()
+
+
+#
+# Threading Building Blocks library
+#
+SET(FEATURE_TBB_HAVE_BUNDLED TRUE)
+SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb30_104oss")
+OPTION(DEAL_II_FORCE_BUNDLED_TBB
+  "Always use the bundled tbb library instead of an external one."
+  OFF)
+
+IF(FEATURE_TBB_BUNDLED_CONFIGURED)
+  ADD_SUBDIRECTORY(${TBB_FOLDER}/src)
 ENDIF()
 
 
+#
+# UMFPACK, AMD and UFCONFIG:
+#
+SET(FEATURE_UMFPACK_HAVE_BUNDLED TRUE)
+SET(UMFPACK_FOLDER "${CMAKE_SOURCE_DIR}/bundled/umfpack")
+OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK
+  "Always use the bundled umfpack library instead of an external one."
+  OFF)
+
 IF(FEATURE_UMFPACK_BUNDLED_CONFIGURED)
-  ADD_SUBDIRECTORY(${umfpack_folder}/UMFPACK/Source)
-  ADD_SUBDIRECTORY(${umfpack_folder}/AMD/Source)
+  ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/UMFPACK/Source)
+  ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/AMD/Source)
 ENDIF()
 
index 5cbe0a8136e18fbc6468bb9daa342fdccb032d69..2c53189ecd5cef1489395c1134d24b4e33ac4089 100644 (file)
@@ -3,6 +3,10 @@
 # Configuration for the lapack library:
 #
 
+OPTION(DEAL_II_WITH_LAPACK
+  "Build deal.II with support for LAPACK."
+  OFF)
+
 
 MACRO(FEATURE_LAPACK_FIND_EXTERNAL var)
   FIND_PACKAGE(LAPACK)
index ec821a5b6bc55d70fa41ce8c01df282b7e4f9d8a..57b2d84d360742aefc056fbd27fd87c2f3178d95 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for mpi support:
 #
 
+OPTION(DEAL_II_WITH_MPI
+  "Build deal.II with support for mpi."
+  OFF)
+
+
 MACRO(FEATURE_MPI_FIND_EXTERNAL var)
   FIND_PACKAGE(MPI)
 
index a77008f39bca4e6442c4c13a26002b964fe38bcc..e80b3e3372f02cc11238fc484888cb92d6f51442 100644 (file)
@@ -2,6 +2,10 @@
 # Configuration for tbb support:
 #
 
+OPTION(DEAL_II_WITH_TBB
+  "Build deal.II with support for tbb. This will enable thread support in deal.II."
+  OFF)
+
 
 #
 # Set up genereal threading:
@@ -121,9 +125,6 @@ MACRO(FEATURE_TBB_CONFIGURE_EXTERNAL var)
 ENDMACRO()
 
 
-SET(FEATURE_TBB_HAVE_BUNDLED TRUE)
-
-
 MACRO(FEATURE_TBB_CONFIGURE_BUNDLED var)
 
   #
@@ -147,11 +148,7 @@ MACRO(FEATURE_TBB_CONFIGURE_BUNDLED var)
       )
   ENDIF()
 
-  #
-  # TODO: Refactor and remove from here:
-  #
-  SET(tbb_folder "${CMAKE_SOURCE_DIR}/bundled/tbb30_104oss")
-  INCLUDE_DIRECTORIES(${tbb_folder}/include)
+  INCLUDE_DIRECTORIES(${TBB_FOLDER}/include)
 
 ENDMACRO()
 
index 880e18be723d84b90e2f355ab68ca7a383231935..230696d816b7d865e81762f9ceba57dc1e9288c0 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for the ARPACK library:
 #
 
+OPTION(DEAL_II_WITH_ARPACK
+  "Build deal.II with support for doxygen and dot."
+  OFF)
+
+
 SET(FEATURE_ARPACK_DEPENDS
   # Currently, with enabled arpack support, we also need to setup
   # LAPACK support in deal.II:
index c800ed1c81ea783a584ac4abf11d8fb89100820e..13d9ef8a9a4e10b70f3dd626340c53c63a333b92 100644 (file)
@@ -2,7 +2,6 @@
 # Configuration for the boost library:
 #
 
-
 #
 # This configure script has to be included after configure_tbb.
 # We need some of the variables defined in SETUP_THREADING for
@@ -16,6 +15,13 @@ IF(NOT FEATURE_TBB_PROCESSED)
 ENDIF()
 
 
+SET(DEAL_II_WITH_BOOST
+  # Always true. We need it :-]
+  ON
+  CACHE BOOL "Build deal.II with support for boost." FORCE
+  )
+
+
 MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
   FIND_PACKAGE (Boost COMPONENTS serialization thread)
 
@@ -48,9 +54,6 @@ MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL var)
 ENDMACRO()
 
 
-SET(FEATURE_BOOST_HAVE_BUNDLED TRUE)
-
-
 MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED var)
 
   #
@@ -64,8 +67,7 @@ MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED var)
     "BOOST_NO_HASH" "BOOST_NO_SLIST"
     )
 
-  SET(boost_folder "${CMAKE_SOURCE_DIR}/bundled/boost-1.49.0")
-  INCLUDE_DIRECTORIES(${boost_folder}/include)
+  INCLUDE_DIRECTORIES(${BOOST_FOLDER}/include)
 
   SET(${var} TRUE)
 ENDMACRO()
@@ -73,7 +75,6 @@ ENDMACRO()
 
 CONFIGURE_FEATURE(BOOST)
 
-
 #
 # DEAL_II_WITH_BOOST is always required.
 #
index 6c9c015333688e6a75012bf07b426b5fddea973e..af8957c5c04d73abc3edb7350f9d6303f0f7e9b2 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for doxygen
 #
 
+OPTION(DEAL_II_WITH_DOXYGEN
+  "Build deal.II with support for doxygen and dot."
+  OFF)
+
+
 MACRO(FEATURE_DOXYGEN_FIND_EXTERNAL var)
   FIND_PACKAGE(Doxygen)
 
index 4b89a097bd9e46732c07197218a73e05714f6461..9265c84d0a5b78a3f7dd1dbd55683feddf571e67 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for functionparser
 #
 
+OPTION(DEAL_II_WITH_FUNCTIONPARSER
+  "Build deal.II with support for functionparser."
+  OFF)
+
+
 MACRO(FEATURE_FUNCTIONPARSER_FIND_EXTERNAL var)
   MESSAGE(STATUS
     "No module available for finding functionparser externally."
@@ -13,16 +18,9 @@ MACRO(FEATURE_FUNCTIONPARSER_CONFIGURE_EXTERNAL var)
 ENDMACRO()
 
 
-SET(FEATURE_FUNCTIONPARSER_HAVE_BUNDLED TRUE)
-
-
 MACRO(FEATURE_FUNCTIONPARSER_CONFIGURE_BUNDLED var)
-
-  SET(functionparser_folder "${CMAKE_SOURCE_DIR}/bundled/functionparser/")
   INCLUDE_DIRECTORIES(${functionparser_folder})
-
   SET(HAVE_FUNCTIONPARSER TRUE)
-
   SET(${var} TRUE)
 ENDMACRO()
 
index 1c0b2c6585451da1354acc50892c4f6a62cbb6ab..02cb5452b0889625343d30176522b59694cd5855 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for the netcdf library:
 #
 
+OPTION(DEAL_II_WITH_METIS
+  "Build deal.II with support for Metis."
+  OFF)
+
+
 MACRO(FEATURE_METIS_FIND_EXTERNAL var)
   FIND_PACKAGE(METIS)
 
index 6dcc526064bbec450e7d60324d350a891b955714..7713f1be785f260f6ad358abc486bec74d3dc84a 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for the netcdf library:
 #
 
+OPTION(DEAL_II_WITH_NETCDF
+  "Build deal.II with support for netcdf."
+  OFF)
+
+
 MACRO(FEATURE_NETCDF_FIND_EXTERNAL var)
   FIND_PACKAGE(NETCDF)
 
index f047747d2c3224f6e7a6b76554c8abe78103e481..f7a2904e8532cf78ba5947efcfde01cdce98d412 100644 (file)
@@ -2,6 +2,10 @@
 # Configuration for the p4est and sc libraries:
 #
 
+OPTION(DEAL_II_WITH_P4EST
+  "Build deal.II with support for p4est."
+  OFF)
+
 
 SET(FEATURE_P4EST_DEPENDS DEAL_II_WITH_MPI)
 
index 17079e5e6a34bd4d8b2ca84c82a2aecf9d27c90d..1b1ff2b5c497f8e2d72db903692daecaabc6592a 100644 (file)
@@ -2,6 +2,11 @@
 # Configuration for the petsc library:
 #
 
+OPTION(DEAL_II_WITH_PETSC
+  "Build deal.II with support for petsc."
+  OFF)
+
+
 MACRO(FEATURE_PETSC_FIND_EXTERNAL var)
 
   FIND_PACKAGE(PETSC)
index 31d8576c59bf34f1e36688c21883250118ee5c4c..29039553ef644c7f4c218d729e39f8cf32e29cea 100644 (file)
@@ -2,6 +2,10 @@
 # Configuration for the trilinos library:
 #
 
+OPTION(DEAL_II_WITH_TRILINOS
+  "Build deal.II with support for trilinos."
+  OFF)
+
 
 MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
   FIND_PACKAGE(TRILINOS)
index 88e81db05c6dc0bd3151bfa44651255fb782d348..5107827adceacec1622aba811c117a49e9ae3aad 100644 (file)
@@ -2,6 +2,10 @@
 # Configuration for the umfpack and amd libraries:
 #
 
+OPTION(DEAL_II_WITH_UMFPACK
+  "Build deal.II with support for UMFPACK."
+  OFF)
+
 
 SET(FEATURE_UMFPACK_DEPENDS
   # Currently, with enabled umfpack support, we also need to setup
@@ -31,19 +35,15 @@ MACRO(FEATURE_UMFPACK_CONFIGURE_EXTERNAL var)
 ENDMACRO()
 
 
-SET(FEATURE_UMFPACK_HAVE_BUNDLED TRUE)
-
-
 MACRO(FEATURE_UMFPACK_CONFIGURE_BUNDLED var)
   #
   # DEAL_II_WITH_LAPACK will pull in an external BLAS library. So no need
   # to setup something more than bundled UMFPACK here.
   #
 
-  SET(umfpack_folder "${CMAKE_SOURCE_DIR}/bundled/umfpack")
   INCLUDE_DIRECTORIES(
-    ${umfpack_folder}/UMFPACK/Include
-    ${umfpack_folder}/AMD/Include
+    ${UMFPACK_FOLDER}/UMFPACK/Include
+    ${UMFPACK_FOLDER}/AMD/Include
     )
 
   SET(HAVE_LIBUMFPACK TRUE)
index 7d9cf5cd5e3db3a80a2ec999a96b3ccf91590598..fb22ffd40d54359eb5d6501c09cbd25cad22d256 100644 (file)
@@ -1,10 +1,19 @@
 #
-# Set up deal.II specific definitions
+# Set up deal.II specific definitions and look for available components
 #
 # This file defines a long list of variables, used throughout the
 # configuration to determine paths, locations and names:
 #
-# General information about deal:
+# General configuration options:
+#
+#     DEAL_II_FEATURE_AUTODETECTION   **)
+#     DEAL_II_ALLOW_BUNDLED           **)
+#     DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS **)
+#     DEAL_II_COMPONENT_COMPAT_FILES  **)
+#     DEAL_II_COMPONENT_DOCUMENTATION **)
+#     DEAL_II_COMPONENT_EXAMPLES      **)
+#
+# General information about deal.II:
 #
 #     DEAL_II_PACKAGE_NAME            *)
 #     DEAL_II_PACKAGE_VERSION
@@ -28,6 +37,7 @@
 #     DEAL_II_CMAKE_MACROS_RELDIR     *)
 #     DEAL_II_DOCUMENTATION_RELDIR    *)
 #     DEAL_II_EXAMPLES_RELDIR         *)
+#     DEAL_II_EXECUTABLE_RELDIR       *)
 #     DEAL_II_INCLUDE_RELDIR          *)
 #     DEAL_II_LIBRARY_RELDIR          *)
 #     DEAL_II_PROJECT_CONFIG_RELDIR   *)
 #     DEAL_II_LIBRARIES_RELEASE
 #
 #     DEAL_II_BUILD_TYPES
+#     DEAL_II_WITH_BUNDLED_DIRECTORY
+#     DEAL_II_WITH_DOC_DIRECTORY
+#
+# *)  Values marked with *) can be overwritten by the command line via
+#     -D<...>
+# **) Cached Option. Can be set via ccmake or on the command line via
+#     -D<...>
+#
+
+
+#
+# Check whether the doc or bundled folder is available:
+#
+IF(EXISTS ${CMAKE_SOURCE_DIR}/bundled/CMakeLists.txt)
+  SET(DEAL_II_WITH_BUNDLED_DIRECTORY TRUE)
+ENDIF()
+
+IF(EXISTS ${CMAKE_SOURCE_DIR}/doc/CMakeLists.txt)
+  SET(DEAL_II_WITH_DOC_DIRECTORY TRUE)
+ENDIF()
+
+
+###########################################################################
+#                                                                         #
+#                     General configuration options:                      #
+#                                                                         #
+###########################################################################
+
+OPTION(DEAL_II_FEATURE_AUTODETECTION
+  "Enables feature autodetection. This will automatically set DEAL_II_WITH_<...> options."
+  ON)
+
+OPTION(DEAL_II_ALLOW_BUNDLED
+  "Allow the use of libraries bundled with the source tarball. (DEAL_II_FORCE_BUNDLED* will overwrite this option.)"
+  ON)
+
+#
+# Build configuration: configuration options regarding compilation and
+# installation of the deal.II library
+#
+OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
+  "configure sensible default CFLAGS and CXXFLAGS depending on platform, compiler and build target."
+  ON)
+
 #
-# *) Values marked with *) can be overwritten by the command line via
-#    -D<...>
+# Component selection: configuration options regarding the setup of
+# different components of the deal.II library
 #
 
+OPTION(DEAL_II_COMPONENT_COMPAT_FILES
+  "Enable installation of the example steps. This adds a COMPONENT \"compat_files\" to the build system."
+  ON)
+
+OPTION(DEAL_II_COMPONENT_EXAMPLES
+  "Enable configuration and installation of the example steps. This adds a COMPONENT \"examples\" to the build system."
+  ON)
+
+If(DEAL_II_WITH_DOC_DIRECTORY)
+  OPTION(DEAL_II_COMPONENT_DOCUMENTATION
+    "Enable configuration, build and installation of the documentation. This adds a COMPONENT \"documentation\" to the build system."
+    )
+ENDIF()
+
+
+###########################################################################
+#                                                                         #
+#                   General information about deal.II:                    #
+#                                                                         #
+###########################################################################
+
 SET_IF_EMPTY(DEAL_II_PACKAGE_NAME "deal.II")
 
 SET(DEAL_II_PACKAGE_VERSION ${VERSION})
@@ -61,6 +136,13 @@ STRING(REGEX REPLACE
   "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_VERSION_MINOR "${VERSION}"
   )
 
+
+###########################################################################
+#                                                                         #
+#          Information about paths, install locations and names:          #
+#                                                                         #
+###########################################################################
+
 SET(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
 
 SET_IF_EMPTY(DEAL_II_BASE_NAME "deal_II")
@@ -76,10 +158,10 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "cmake/macros")
   SET_IF_EMPTY(DEAL_II_DOCUMENTATION_RELDIR "doc")
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "examples")
+  SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin")
   SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
   SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib")
   SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR ".")
-
 ELSE()
   #
   # IF DEAL_II_COMPONENT_COMPAT_FILES is not set, we assume that we have to
@@ -88,22 +170,22 @@ ELSE()
   SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "share/${DEAL_II_PACKAGE_NAME}/cmake/Macros")
   SET_IF_EMPTY(DEAL_II_DOCUMENTATION_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/html")
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/examples")
+  SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin")
   SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
   SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}")
   SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
 ENDIF()
 
-
 LIST(APPEND DEAL_II_INCLUDE_DIRS
   "${CMAKE_INSTALL_PREFIX}/${DEAL_II_INCLUDE_RELDIR}"
   "${CMAKE_INSTALL_PREFIX}/${DEAL_II_INCLUDE_RELDIR}/deal.II"
   "${CMAKE_INSTALL_PREFIX}/${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled"
   )
 
+
 #
 # A lot of magic to guess the resulting library names:
 #
-
 IF(BUILD_SHARED_LIBS)
   SET(DEAL_II_LIBRARY_NAME_RELEASE ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} )
   SET(DEAL_II_LIBRARY_NAME_DEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX} )
@@ -136,9 +218,17 @@ IF(CMAKE_BUILD_TYPE MATCHES "Release")
   LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE")
 ENDIF()
 
+
+
+#
+# Cleanup some files used for storing the names of alle object targets that
+# will be bundled to the deal.II library. (Right now, i.e. cmake 2.8.8,
+# this is the only reliable way to get information in a global scope...)
+#
 FOREACH(build ${DEAL_II_BUILD_TYPES})
   STRING(TOLOWER "${build}" build_lowercase)
   FILE(REMOVE
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${build_lowercase}
     )
 ENDFOREACH()
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.