From 68c9a49ca209853cdd7b8a0be78eb66ec2ff31bf Mon Sep 17 00:00:00 2001 From: maier Date: Sat, 23 Mar 2013 23:57:36 +0000 Subject: [PATCH] CMake: Finish CMake documentation git-svn-id: https://svn.dealii.org/trunk@29004 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 16 ++---- deal.II/doc/development/cmake-internals.html | 58 +++++++++++++++++++- deal.II/include/CMakeLists.txt | 2 +- 3 files changed, 62 insertions(+), 14 deletions(-) diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index ef66de36f6..7d31c824bb 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -114,26 +114,22 @@ INCLUDE(setup_finalize) ########################################################################### MESSAGE(STATUS "") -MESSAGE(STATUS "Configuring done. Include CMakeLists.txt now.") - -IF(DEAL_II_HAVE_BUNDLED_DIRECTORY) - ADD_SUBDIRECTORY(bundled) -ENDIF() +MESSAGE(STATUS "Configuring done. Proceed to target definitions now.") ADD_SUBDIRECTORY(cmake/scripts) - ADD_SUBDIRECTORY(include) IF(DEAL_II_HAVE_DOC_DIRECTORY) - ADD_SUBDIRECTORY(doc) + ADD_SUBDIRECTORY(doc) # has to be included after include ENDIF() -ADD_SUBDIRECTORY(source) +IF(DEAL_II_HAVE_BUNDLED_DIRECTORY) + ADD_SUBDIRECTORY(bundled) +ENDIF() +ADD_SUBDIRECTORY(source) # has to be included after bundled ADD_SUBDIRECTORY(cmake/config) # has to be included after source - ADD_SUBDIRECTORY(contrib) # has to be included after source - ADD_SUBDIRECTORY(examples) # diff --git a/deal.II/doc/development/cmake-internals.html b/deal.II/doc/development/cmake-internals.html index e35a995dea..a21b8f0b79 100644 --- a/deal.II/doc/development/cmake-internals.html +++ b/deal.II/doc/development/cmake-internals.html @@ -593,17 +593,69 @@

./source/CMakeLists.txt

- TODO + All parts of the library are organized into logical object libraries + with their respective sources lying under + ./source/<foo>, or + ./bundled/<foo>/<...>. The actual setup of + an object library happens within that subdirectories with the help of + two macros: +

+
+    #
+    # A list of source files forming the object target:
+    #
+    SET(src
+      ...
+      dof_tools.cc
+      )
+
+    #
+    # A list of instantiations that must be expanded:
+    #
+    SET(inst_in_files
+      ...
+      dof_tools.inst.in
+      )
+
+    #
+    # The following macro will set up an obj_dofs.debug and
+    # obj_dofs.release target  with appropriate compile flags and
+    # definitions for a simultaneous build of debug and release library.
+    # Furthermore, the object name will be stored in
+    #   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_(debug/release)
+    # so that it is available in global scope.
+    #
+    DEAL_II_ADD_LIBRARY(obj_dofs OBJECT ${src})
+
+    #
+    # This macro will set up an obj_dofs.inst target for expanding all
+    # files listed in ${inst_in_files}. Appropriate target dependencies
+    # will be added to obj_dofs.debug and obj_dofs.release.
+    #
+    EXPAND_INSTANTIATIONS(obj_dofs "${inst_in_files}")
+      
+

+ +

+ Later, all object targets are collected in + ./source/CMakeLists.txt to define the actual debug and + releases libraries. For further details, see + ./source/CMakelists.txt and + ./cmake/macros/macro_deal_ii_add_library.cmake.

./cmake/config/CMakeLists.txt

- TODO + The final bits of configuration happens in + ./cmake/config/CMakeLists.txt where the templates for + the project configuration deal.IIConfig.cmake and the + compatibility file Make.global_options get expanded. + Furthermore, the configuration for the template expansion mechanism + resides under ./cmake/config/template_arguments.in.

-
diff --git a/deal.II/include/CMakeLists.txt b/deal.II/include/CMakeLists.txt index 4d03268c71..8cf4306ebd 100644 --- a/deal.II/include/CMakeLists.txt +++ b/deal.II/include/CMakeLists.txt @@ -21,7 +21,7 @@ CONFIGURE_FILE( ) # -# Add a rule on how to install the header files: +# Add a rule for how to install the header files: # INSTALL(DIRECTORY deal.II DESTINATION ${DEAL_II_INCLUDE_RELDIR} -- 2.39.5