]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Finish CMake documentation
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Mar 2013 23:57:36 +0000 (23:57 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Mar 2013 23:57:36 +0000 (23:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@29004 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/doc/development/cmake-internals.html
deal.II/include/CMakeLists.txt

index ef66de36f6ba328b7827529a25a23357bba08525..7d31c824bba3cd12e1f33922aee713be2b9ee6f6 100644 (file)
@@ -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)
 
 #
index e35a995dea38694e17224e9a7691b67fa7a89919..a21b8f0b797cc0085add9df11260bead5acefdca 100644 (file)
     <h3><code>./source/CMakeLists.txt</code></h3>
 
     <p>
-      TODO
+      All parts of the library are organized into logical object libraries
+      with their respective sources lying under
+      <code>./source/&lt;foo&gt;</code>, or
+      <code>./bundled/&lt;foo&gt;/&lt;...&gt;</code>. The actual setup of
+      an object library happens within that subdirectories with the help of
+      two macros:
+      <pre>
+
+    #
+    # 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}")
+      </pre>
+    </p>
+
+    <p>
+      Later, all object targets are collected in
+      <code>./source/CMakeLists.txt</code> to define the actual debug and
+      releases libraries. For further details, see
+      <code>./source/CMakelists.txt</code> and
+      <code>./cmake/macros/macro_deal_ii_add_library.cmake</code>.
     </p>
 
     <a name="projectconfig"></a>
     <h3><code>./cmake/config/CMakeLists.txt</code></h3>
 
     <p>
-      TODO
+      The final bits of configuration happens in
+      <code>./cmake/config/CMakeLists.txt</code> where the templates for
+      the project configuration <code>deal.IIConfig.cmake</code> and the
+      compatibility file <code>Make.global_options</code> get expanded.
+      Furthermore, the configuration for the template expansion mechanism
+      resides under <code>./cmake/config/template_arguments.in</code>.
     </p>
 
-
     <hr>
 
     <address>
index 4d03268c7130cf3377d12c88f9f4d5caa57ed71b..8cf4306ebdfc0f412ac56ee34622e8070eeffe77 100644 (file)
@@ -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}

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.