flags or compiler support, please respect the following note
<pre>
-
- #
- # (./cmake/setup_compiler_flags.cmake)
- #
- # ####################
- # # FAT NOTE: #
- # ####################
- #
- # All configuration in setup_compiler_flags.cmake and
- # setup_compiler_flags_<compiler>.cmake shall ONLY modify:
- #
- # CMAKE_CXX_FLAGS
- # DEAL_II_CXX_FLAGS_DEBUG
- # DEAL_II_CXX_FLAGS_RELEASE
- # DEAL_II_LINKER_FLAGS
- # DEAL_II_LINKER_FLAGS_DEBUG
- # DEAL_II_LINKER_FLAGS_RELEASE
- #
- # All modifications shall be guarded with the ENABLE_IF_SUPPORTED
- # or ENABLE_IF_LINKS macro, e.g.
- #
- # ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
- # ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
- #
- # Compiler flags for platform dependent optimization (such as
- # -march=native) must always be guarded with
- # DEAL_II_ALLOW_PLATFORM_INTROSPECTION:
- #
- # IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
- # ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-march=native")
- # ENDIF()
- #
- # Checks for compiler features (such as C++11 support) and compiler
- # specific bugs that
- # - usually set up further configuration (such as preprocessor
- # definitions)
- # - disable a specific flag for a specific compiler version.
- #
- # belong the corresponding file:
- #
- # ./cmake/checks/check_01_compiler_features.cmake
- # ./cmake/checks/check_01_cpu_features.cmake
- # ./cmake/checks/check_01_cxx_features.cmake
- # ./cmake/checks/check_01_system_features.cmake
- # ./cmake/checks/check_02_compiler_bugs.cmake
- #
+#
+# (./cmake/setup_compiler_flags.cmake)
+#
+# ####################
+# # FAT NOTE: #
+# ####################
+#
+# All configuration in setup_compiler_flags.cmake and
+# setup_compiler_flags_<compiler>.cmake shall ONLY modify:
+#
+# CMAKE_CXX_FLAGS
+# DEAL_II_CXX_FLAGS_DEBUG
+# DEAL_II_CXX_FLAGS_RELEASE
+# DEAL_II_LINKER_FLAGS
+# DEAL_II_LINKER_FLAGS_DEBUG
+# DEAL_II_LINKER_FLAGS_RELEASE
+#
+# All modifications shall be guarded with the ENABLE_IF_SUPPORTED
+# or ENABLE_IF_LINKS macro, e.g.
+#
+# ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
+# ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
+#
+# Compiler flags for platform dependent optimization (such as
+# -march=native) must always be guarded with
+# DEAL_II_ALLOW_PLATFORM_INTROSPECTION:
+#
+# IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
+# ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-march=native")
+# ENDIF()
+#
+# Checks for compiler features (such as C++11 support) and compiler
+# specific bugs that
+# - usually set up further configuration (such as preprocessor
+# definitions)
+# - disable a specific flag for a specific compiler version.
+#
+# belong the corresponding file:
+#
+# ./cmake/checks/check_01_compiler_features.cmake
+# ./cmake/checks/check_01_cpu_features.cmake
+# ./cmake/checks/check_01_cxx_features.cmake
+# ./cmake/checks/check_01_system_features.cmake
+# ./cmake/checks/check_02_compiler_bugs.cmake
+#
</pre>
</ul>
</p>
there are:
<pre>
-
- ./cmake/checks/check_01_compiler_features.cmake
- - Search for support for compiler dependent features such as stack
- trace support, demangler support, etc.
-
- ./cmake/checks/check_01_cpu_features.cmake
- - Platform introspection for CPU features goes here and must be
- guarded with DEAL_II_ALLOW_PLATFORM_INTROSPECTION
+./cmake/checks/check_01_compiler_features.cmake
+ - Search for support for compiler dependent features such as stack
+ trace support, demangler support, etc.
- ./cmake/checks/check_01_cxx_features.cmake
- - Check for supported C++ language features such as sufficient C++11
- support
+./cmake/checks/check_01_cpu_features.cmake
+ - Platform introspection for CPU features goes here and must be
+ guarded with DEAL_II_ALLOW_PLATFORM_INTROSPECTION
- ./cmake/checks/check_01_system_features.cmake
- - Checks for specific platform (Linux/Darwin/CYGWIN/Windows..)
- features and support
+./cmake/checks/check_01_cxx_features.cmake
+ - Check for supported C++ language features such as sufficient C++11
+ support
- ./cmake/checks/check_02_compiler_bugs.cmake
- - Check for compiler bugs
+./cmake/checks/check_01_system_features.cmake
+ - Checks for specific platform (Linux/Darwin/CYGWIN/Windows..)
+ features and support
+./cmake/checks/check_02_compiler_bugs.cmake
+ - Check for compiler bugs
</pre>
<ul>
There are a number of readily available platform check macros:
<pre>
-
- CHECK_CXX_SOURCE_COMPILES(source variable)
- - Checks whether it is possible to compile _and_ link the code snippet
- <source>. If successful, variable is set to 1.
-
- CHECK_CXX_SOURCE_RUNS(source variable)
- - variable is set to 1 if <source> could be successfully compiled and
- linked and the resulting program ran and exited without error.
- Avoid this macro outside of a DEAL_II_ALLOW_PLATFORM_INTROSPECTION
- guard. A sensible fallback should be provided if the check cannot
- be run (e.g. when cross compiling).
-
- CHECK_CXX_COMPILER_BUG(source variable)
- - Inverts the logic of CHECK_CXX_SOURCE_COMPILES(), i.e. variable is
- set to 1 if it was not possible to compile and link <source>.
-
- CHECK_INCLUDE_FILE_CXX(header variable)
- - Check whether it is possible to compile and link a dummy program
- including <header>.
-
- CHECK_FUNCTION_EXISTS(function variable)
- - Check for the existence of a function prototype with name
- <function>. (Don't forget to specify the link libraries, see
- below.) Use CHECK_CXX_SYMBOL_EXISTS to search for C++ function
- definitions instead, if possible.
-
- CHECK_CXX_SYMBOL_EXISTS(symbol header_file variable)
- - Check for the existence of a symbol definition in the header_file
- as well as for the presence in the current link interface
- (Don't forget to specify the link libraries, see below.)
-
- CHECK_CXX_COMPILER_FLAG(flag variable)
- - Sets the variable to 1 if the compiler understands the flag.
-
+CHECK_CXX_SOURCE_COMPILES(source variable)
+ - Checks whether it is possible to compile _and_ link the code snippet
+ <source>. If successful, variable is set to 1.
+
+CHECK_CXX_SOURCE_RUNS(source variable)
+ - variable is set to 1 if <source> could be successfully compiled and
+ linked and the resulting program ran and exited without error.
+ Avoid this macro outside of a DEAL_II_ALLOW_PLATFORM_INTROSPECTION
+ guard. A sensible fallback should be provided if the check cannot
+ be run (e.g. when cross compiling).
+
+CHECK_CXX_COMPILER_BUG(source variable)
+ - Inverts the logic of CHECK_CXX_SOURCE_COMPILES(), i.e. variable is
+ set to 1 if it was not possible to compile and link <source>.
+
+CHECK_INCLUDE_FILE_CXX(header variable)
+ - Check whether it is possible to compile and link a dummy program
+ including <header>.
+
+CHECK_FUNCTION_EXISTS(function variable)
+ - Check for the existence of a function prototype with name
+ <function>. (Don't forget to specify the link libraries, see
+ below.) Use CHECK_CXX_SYMBOL_EXISTS to search for C++ function
+ definitions instead, if possible.
+
+CHECK_CXX_SYMBOL_EXISTS(symbol header_file variable)
+ - Check for the existence of a symbol definition in the header_file
+ as well as for the presence in the current link interface
+ (Don't forget to specify the link libraries, see below.)
+
+CHECK_CXX_COMPILER_FLAG(flag variable)
+ - Sets the variable to 1 if the compiler understands the flag.
</pre>
<li> Necessary compiler flags can easily set in the string variable
<code>CMAKE_REQUIRED_FLAGS</code>. There are two small macros
that do this job nicely:
-<pre>
-
- PUSH_TEST_FLAG("-Werror")
- CHECK_CXX_SOURCE_COMPILES(...)
- POP_TEST_FLAG()
+<pre class="cmake">
+PUSH_TEST_FLAG("-Werror")
+CHECK_CXX_SOURCE_COMPILES(...)
+POP_TEST_FLAG()
</pre>
<li> Necessary include directories and libraries necessary for
lists and later on reset <code>CMAKE_REQUIRED_*</code> (including
<code>CMAKE_REQUIRED_FLAGS</code>) to their default values:
-<pre>
-
- LIST(APPEND CMAKE_REQUIRED_INCLUDES <a list of includes>)
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES <a list of libraries>)
- CHECK_CXX_SOURCE_COMPILES(...)
- RESET_CMAKE_REQUIRED()
+<pre class="cmake">
+LIST(APPEND CMAKE_REQUIRED_INCLUDES <a list of includes>)
+LIST(APPEND CMAKE_REQUIRED_LIBRARIES <a list of libraries>)
+CHECK_CXX_SOURCE_COMPILES(...)
+RESET_CMAKE_REQUIRED()
</pre>
</ul>
</p>
If successful, the following uncached variables might be set:
<pre>
-
- FEATURE_FOUND
- FEATURE_LIBRARIES
- FEATURE_INCLUDE_DIRS
- FEATURE_LINKER_FLAGS
-
- FEATURE_VERSION
- FEATURE_VERSION_MAJOR
- FEATURE_VERSION_MINOR
- FEATURE_VERSION_SUBMINOR
+FEATURE_FOUND
+FEATURE_LIBRARIES
+FEATURE_INCLUDE_DIRS
+FEATURE_LINKER_FLAGS
+
+FEATURE_VERSION
+FEATURE_VERSION_MAJOR
+FEATURE_VERSION_MINOR
+FEATURE_VERSION_SUBMINOR
</pre>
There are obviously valid exceptions from this rule, though.
A hint with <code>FEATURE_DIR</code> can be set up for
convenience. It is best to start the <code>Find</code> module by
-<pre>
-
- SET_IF_EMPTY(FEATURE_DIR "$ENV{FEATURE_DIR}")
+<pre class="cmake">
+SET_IF_EMPTY(FEATURE_DIR "$ENV{FEATURE_DIR}")
</pre>
and use <code>FEATURE_DIR</code> as a hint. If the external
library could be found, hide it via
<code>MARK_AS_ADVANCED</code>, if the external library could not
be found, set a cache value:
-<pre>
-
- SET(FEATURE_DIR "" CACHE PATH "An optional hint to a FEATURE directory")
+<pre class="cmake">
+SET(FEATURE_DIR "" CACHE PATH "An optional hint to a FEATURE directory")
</pre>
</ul>
- <a name="configure"></a>
- <h3> <code>./cmake/configure/configure_*.cmake</code> </h3>
-
+<a name="configure"></a>
+<h3> <code>./cmake/configure/configure_*.cmake</code> </h3>
+
<p>
The final step in the configuration phase is the setup of features
(which refer to external or bundled libraries
<acronym>deal.II</acronym> can optionally interface with.)
-
</p>
- <p>
- At bare minimum <code>configure_<feature>.cmake</code>
- file for a feature just consists of a call to the
- <code>CONFIGURE_FEATURE(<FEATURE>)</code> macro which is
- implemented in
- <code>./cmake/macros/macro_configure_feature.cmake</code>.
- In this case the corresponding <code>Find<FEATURE>.cmake</code>
- module is used to determine whether an external dependency can be
- resolved or not. Depending on the current state of
- <code>DEAL_II_WITH_<FEATURE></code> (see
- <a href="cmake.html#configurefeature">here</a>) the variables
- <pre>
-
- FEATURE_LIBRARIES
- FEATURE_INCLUDE_DIRS
- FEATURE_LINKER_FLAGS
- </pre>
- are appended to the set of <a href="#variables">global variables</a>
- and <code>DEAL_II_WITH_<FEATURE></code> is set to
- <code>TRUE</code>.
- </p>
-
- <p>
- It is possible to override this default behaviour with the following
- variables and macros (all of them are optional and will be replaced
- by an appropriate default action if unset):
+<p>
+ At bare minimum <code>configure_<feature>.cmake</code>
+ file for a feature just consists of a call to the
+ <code>CONFIGURE_FEATURE(<FEATURE>)</code> macro which is
+ implemented in
+ <code>./cmake/macros/macro_configure_feature.cmake</code>.
+ In this case the corresponding <code>Find<FEATURE>.cmake</code>
+ module is used to determine whether an external dependency can be
+ resolved or not. Depending on the current state of
+ <code>DEAL_II_WITH_<FEATURE></code> (see
+ <a href="cmake.html#configurefeature">here</a>) the variables
+<pre>
+FEATURE_LIBRARIES
+FEATURE_INCLUDE_DIRS
+FEATURE_LINKER_FLAGS
+</pre>
+ are appended to the set of <a href="#variables">global variables</a>
+ and <code>DEAL_II_WITH_<FEATURE></code> is set to
+ <code>TRUE</code>.
+</p>
+
+<p>
+ It is possible to override this default behaviour with the following
+ variables and macros (all of them are optional and will be replaced
+ by an appropriate default action if unset):
+ <ul>
+ <li>
+ <code><FEATURE></code> means all caps,
+ <code><feature></code> means all lowercase
+
+ <li>
+ In <code>./cmake/configure/configure_<feature>.cmake</code>:
+<pre>
+FEATURE_<FEATURE>_DEPENDS (a variable)
+ - a variable which contains an optional list of other features
+ this feature depends on (and which have to be enabled for this feature
+ to work.) The features must be given with the full option toggle:
+ DEAL_II_WITH_[...]
+
+FEATURE_<FEATURE>_FIND_EXTERNAL(var) (a macro)
+ - which should set var to TRUE if all dependencies for the feature are
+ fulfilled. In this case all necessary variables for
+ FEATURE_<FEATURE>_CONFIGURE_EXTERNAL must be set.
+ Otherwise var should remain unset.
+ If this macro is undefined, FIND_PACKAGE(<FEATURES>) is
+ called directly instead.
+
+FEATURE_<FEATURE>_CONFIGURE_EXTERNAL() (a macro)
+ - which should setup all necessary configuration for the feature with
+ external dependencies. If something goes wrong this macro must
+ issue a FATAL_ERROR.
+ If this macro is undefined, the information provided in
+ <FEATURES>_LIBRARIES, <FEATURES>_INCLUDE_DIRS and
+ <FEATURES>_LINKER_FLAGS is used for the build.
+
+FEATURE_<FEATURE>_CONFIGURE_BUNDLED() (a macro)
+ - which should setup all necessary configuration for the feature with
+ bundled source dependencies. If something goes wrong this macro must
+ issue a FATAL_ERROR.
+
+FEATURE_<FEATURE>_ERROR_MESSAGE() (macro)
+ - which should print a meaningful error message (with FATAL_ERROR) for
+ the case that no external library was found (and bundled is not
+ allowed to be used.) If not defined, a suitable default error message
+ will be printed.
+</pre>
+
+ <li>
+ In <code>./bundled/CMakeLists.txt</code>:
+<pre>
+FEATURE_<FEATURE>_HAVE_BUNDLED (a boolean)
+ - which should either be set to TRUE if all necessary libraries of the
+ features comes bundled with deal.II and hence can be supported
+ without external dependencies, or unset.
+
+DEAL_II_FORCE_BUNDLED_<FEATURE> (an option)
+ - If <feature> can be set up by bundled libraries, this
+ configuration option must be present to force a use of bundled
+ dependencies
+</pre>
+
+ <li>
+ Furthermore, if
+ <code>FEATURE_<FEATURE>_BUNDLED_CONFIGURED</code> is set to
+ <code>TRUE</code> the file <code>./bundled/CMakeLists.txt</code>
+ must compile and install the bundled package appropriately.
+ </ul>
+</p>
+
+
+
+<a name="variables"></a>
+<h3> Global variables controlling the build process </h3>
+
+<p>
+ The following list describes all global variables controlling the
+ build process and the visibility associated with it (internal use for
+ compiling deal.Ii, externally used variables will get exported in
+ deal.IIConfig.cmake). Lists should be manipulated with
+ <code>LIST(APPEND ...)</code>, flags with <code>ADD_FLAGS(...)</code>
+ (or if it is necessary to guard them with
+ <code>ENABLE_IF_SUPPORTED(...)</code>.)
+ <ul>
+ <li>
+ The general (internal) logic for variables applies:
<ul>
- <li>
- <code><FEATURE></code> means all caps,
- <code><feature></code> means all lowercase
-
- <li>
- In <code>./cmake/configure/configure_<feature>.cmake</code>:
- <pre>
-
- FEATURE_<FEATURE>_DEPENDS (a variable)
- - a variable which contains an optional list of other features
- this feature depends on (and which have to be enabled for this feature
- to work.) The features must be given with the full option toggle:
- DEAL_II_WITH_[...]
-
- FEATURE_<FEATURE>_FIND_EXTERNAL(var) (a macro)
- - which should set var to TRUE if all dependencies for the feature are
- fulfilled. In this case all necessary variables for
- FEATURE_<FEATURE>_CONFIGURE_EXTERNAL must be set.
- Otherwise var should remain unset.
- If this macro is undefined, FIND_PACKAGE(<FEATURES>) is
- called directly instead.
-
- FEATURE_<FEATURE>_CONFIGURE_EXTERNAL() (a macro)
- - which should setup all necessary configuration for the feature with
- external dependencies. If something goes wrong this macro must
- issue a FATAL_ERROR.
- If this macro is undefined, the information provided in
- <FEATURES>_LIBRARIES, <FEATURES>_INCLUDE_DIRS and
- <FEATURES>_LINKER_FLAGS is used for the build.
-
- FEATURE_<FEATURE>_CONFIGURE_BUNDLED() (a macro)
- - which should setup all necessary configuration for the feature with
- bundled source dependencies. If something goes wrong this macro must
- issue a FATAL_ERROR.
-
- FEATURE_<FEATURE>_ERROR_MESSAGE() (macro)
- - which should print a meaningful error message (with FATAL_ERROR) for
- the case that no external library was found (and bundled is not
- allowed to be used.) If not defined, a suitable default error message
- will be printed.
- </pre>
-
- <li>
- In <code>./bundled/CMakeLists.txt</code>:
- <pre>
-
- FEATURE_<FEATURE>_HAVE_BUNDLED (a boolean)
- - which should either be set to TRUE if all necessary libraries of the
- features comes bundled with deal.II and hence can be supported
- without external dependencies, or unset.
-
- DEAL_II_FORCE_BUNDLED_<FEATURE> (an option)
- - If <feature> can be set up by bundled libraries, this
- configuration option must be present to force a use of bundled
- dependencies
- </pre>
-
- <li>
- Furthermore, if
- <code>FEATURE_<FEATURE>_BUNDLED_CONFIGURED</code> is set to
- <code>TRUE</code> the file <code>./bundled/CMakeLists.txt</code>
- must compile and install the bundled package appropriately.
+ <li>A variable name without <code>_DEBUG</code> or
+ <code>_RELEASE</code>: Used for all targets
+ <li> <code><...>_DEBUG</code>: <i>additionally</i> used for debug targets
+ <li> <code><...>_RELEASE</code>: <i>additionally</i> used for release targets
</ul>
- </p>
-
+ <li>
+ For internal use, for setting necessary linker flags for the deal.II library:
+ <ul>
+ <li> <code>DEAL_II_LINKER_FLAGS</code>
+ <li> <code>DEAL_II_LINKER_FLAGS_DEBUG</code>
+ <li> <code>DEAL_II_LINKER_FLAGS_RELEASE</code>
+ </ul>
+ <li>
+ For internal use, for setting necessary compiler flags, e.g.
+ <code>-std=c++11</code> (if available):
+ <ul>
+ <li> <code>CMAKE_CXX_FLAGS</code>
+ <li> <code>DEAL_II_CXX_FLAGS_DEBUG</code>
+ <li> <code>DEAL_II_CXX_FLAGS_RELEASE</code>
+ </ul>
+ <li>
+ For internal use, for setting necessary include dirs for the compilation of the
+ <acronym>deal.II</acronym> library:
+ <ul>
+ <li> <code>INCLUDE_DIRECTORIES(...)</code>
+ </ul>
- <a name="variables"></a>
- <h3> Global variables controlling the build process </h3>
+ <li>
+ For internal use, for setting necessary preprocessor definitions
+ (<code>-D<...></code>) for the compilation of the
+ deal.II library:
+ <ul>
+ <li> <code>DEAL_II_DEFINITIONS</code>
+ <li> <code>DEAL_II_DEFINITIONS_DEBUG</code>
+ <li> <code>DEAL_II_DEFINITIONS_RELEASE</code>
+ </ul>
- <p>
- The following list describes all global variables controlling the
- build process and the visibility associated with it (internal use for
- compiling deal.Ii, externally used variables will get exported in
- deal.IIConfig.cmake). Lists should be manipulated with
- <code>LIST(APPEND ...)</code>, flags with <code>ADD_FLAGS(...)</code>
- (or if it is necessary to guard them with
- <code>ENABLE_IF_SUPPORTED(...)</code>.)
+ <li>
+ For internal and external use, used to keep track of external
+ libraries, the <acronym>deal.II</acronym> library and user
+ programs have to be linked against:
<ul>
- <li>
- The general (internal) logic for variables applies:
- <ul>
- <li>A variable name without <code>_DEBUG</code> or
- <code>_RELEASE</code>: Used for all targets
- <li> <code><...>_DEBUG</code>: <i>additionally</i> used for debug targets
- <li> <code><...>_RELEASE</code>: <i>additionally</i> used for release targets
- </ul>
-
- <li>
- For internal use, for setting necessary linker flags for the deal.II library:
- <ul>
- <li> <code>DEAL_II_LINKER_FLAGS</code>
- <li> <code>DEAL_II_LINKER_FLAGS_DEBUG</code>
- <li> <code>DEAL_II_LINKER_FLAGS_RELEASE</code>
- </ul>
-
- <li>
- For internal use, for setting necessary compiler flags, e.g.
- <code>-std=c++11</code> (if available):
- <ul>
- <li> <code>CMAKE_CXX_FLAGS</code>
- <li> <code>DEAL_II_CXX_FLAGS_DEBUG</code>
- <li> <code>DEAL_II_CXX_FLAGS_RELEASE</code>
- </ul>
-
- <li>
- For internal use, for setting necessary include dirs for the compilation of the
- <acronym>deal.II</acronym> library:
- <ul>
- <li> <code>INCLUDE_DIRECTORIES(...)</code>
- </ul>
-
- <li>
- For internal use, for setting necessary preprocessor definitions
- (<code>-D<...></code>) for the compilation of the
- deal.II library:
- <ul>
- <li> <code>DEAL_II_DEFINITIONS</code>
- <li> <code>DEAL_II_DEFINITIONS_DEBUG</code>
- <li> <code>DEAL_II_DEFINITIONS_RELEASE</code>
- </ul>
-
- <li>
- For internal and external use, used to keep track of external
- libraries, the <acronym>deal.II</acronym> library and user
- programs have to be linked against:
- <ul>
- <li> <code>DEAL_II_EXTERNAL_LIBRARIES</code>
- <li> <code>DEAL_II_EXTERNAL_LIBRARIES_DEBUG</code>
- <li> <code>DEAL_II_EXTERNAL_LIBRARIES_RELEASE</code>
- </ul>
-
- <li>
- For external use, used to keep track of external preprocessor
- definitions, necessary for the compilation of user programs:
- <ul>
- <li> <code>DEAL_II_USER_DEFINITIONS</code>
- <li> <code>DEAL_II_USER_DEFINITIONS_DEBUG</code>
- <li> <code>DEAL_II_USER_DEFINITIONS_RELEASE</code>
- </ul>
-
- <li>
- Used to keep track of external include dirs, necessary for the
- compilation of user programs:
- <ul>
- <li> <code>DEAL_II_USER_INCLUDE_DIRS</code>
- </ul>
+ <li> <code>DEAL_II_EXTERNAL_LIBRARIES</code>
+ <li> <code>DEAL_II_EXTERNAL_LIBRARIES_DEBUG</code>
+ <li> <code>DEAL_II_EXTERNAL_LIBRARIES_RELEASE</code>
</ul>
- </p>
-
- <h2>Target definition and installation</h2>
- <a name="config.h.in"></a>
- <h3> <code>./include/deal.II/base/config.h.in</code> </h3>
+ <li>
+ For external use, used to keep track of external preprocessor
+ definitions, necessary for the compilation of user programs:
+ <ul>
+ <li> <code>DEAL_II_USER_DEFINITIONS</code>
+ <li> <code>DEAL_II_USER_DEFINITIONS_DEBUG</code>
+ <li> <code>DEAL_II_USER_DEFINITIONS_RELEASE</code>
+ </ul>
- In contrast to autoconf there is no intermediate step any more that
- automatically generates config.h.in. The setup in this file has to be
- done by hand. Please note:
+ <li>
+ Used to keep track of external include dirs, necessary for the
+ compilation of user programs:
<ul>
- <li> <code>config.h.in</code> should only contain a minimum of
- necessary compile definitions to avoid unnecessary recompilation if
- configuration changes.
- <li> Definition toggles in <code>config.h.in</code> should have a
- prominent comment explaining it and should be grouped by file
- exporting the definition.
+ <li> <code>DEAL_II_USER_INCLUDE_DIRS</code>
</ul>
+ </ul>
+</p>
+
+
+<h2>Target definition and installation</h2>
+<a name="config.h.in"></a>
+<h3> <code>./include/deal.II/base/config.h.in</code> </h3>
+
+In contrast to autoconf there is no intermediate step any more that
+automatically generates config.h.in. The setup in this file has to be
+done by hand. Please note:
+ <ul>
+ <li> <code>config.h.in</code> should only contain a minimum of
+ necessary compile definitions to avoid unnecessary recompilation if
+ configuration changes.
+ <li> Definition toggles in <code>config.h.in</code> should have a
+ prominent comment explaining it and should be grouped by file
+ exporting the definition.
+ </ul>
+
+<a name="source"></a>
+<h3><code>./source/CMakeLists.txt</code></h3>
+
+<p>
+ All parts of the library are organized into logical object libraries
+ with their respective sources lying under
+ <code>./source/<foo></code>, or
+ <code>./bundled/<foo>/<...></code>. The actual setup of
+ an object library happens within that subdirectories with the help of
+ two macros:
+<pre class="cmake">
+#
+# Glob for all header files associated with the object target:
+# As this list is only for cosmetic reasons, so that associated header
+# files show up in IDEs, we don't manage an explicit list (with the
+# trade-off to have to run "make rebuild_cache" when a new header file
+# emerges...)
+#
+FILE(GLOB _header
+ ${CMAKE_SOURCE_DIR}/include/deal.II/dofs/*.h
+ )
+
+#
+# A list of source files forming the object target:
+#
+SET(_src
+ ...
+ dof_tools.cc
+ )
+
+#
+# A list of instantiations that must be expanded:
+#
+SET(_inst
+ ...
+ 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.
+#
+# Header files and instatiation files (${_header}, ${_inst}) are added
+# for cosmetic reasons, so that they show up in IDEs.
+#
+DEAL_II_ADD_LIBRARY(obj_dofs OBJECT ${_src} ${_header} ${_inst})
+
+#
+# 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>
+ 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>
+ <a href="../authors.html" target="body">The deal.II Authors</a>
+ $Date$
+</address>
+<div class="right">
+ <a href="http://validator.w3.org/check?uri=referer" target="_top">
+ <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
+ <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
+ <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
+</div>
- <a name="source"></a>
- <h3><code>./source/CMakeLists.txt</code></h3>
-
- <p>
- All parts of the library are organized into logical object libraries
- with their respective sources lying under
- <code>./source/<foo></code>, or
- <code>./bundled/<foo>/<...></code>. The actual setup of
- an object library happens within that subdirectories with the help of
- two macros:
- <pre>
-
- #
- # Glob for all header files associated with the object target:
- # As this list is only for cosmetic reasons, so that associated header
- # files show up in IDEs, we don't manage an explicit list (with the
- # trade-off to have to run "make rebuild_cache" when a new header file
- # emerges...)
- #
- FILE(GLOB _header
- ${CMAKE_SOURCE_DIR}/include/deal.II/dofs/*.h
- )
-
- #
- # A list of source files forming the object target:
- #
- SET(_src
- ...
- dof_tools.cc
- )
-
- #
- # A list of instantiations that must be expanded:
- #
- SET(_inst
- ...
- 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.
- #
- # Header files and instatiation files (${_header}, ${_inst}) are added
- # for cosmetic reasons, so that they show up in IDEs.
- #
- DEAL_II_ADD_LIBRARY(obj_dofs OBJECT ${_src} ${_header} ${_inst})
-
- #
- # 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>
- 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>
- <a href="../authors.html" target="body">The deal.II Authors</a>
- $Date$
- </address>
- <div class="right">
- <a href="http://validator.w3.org/check?uri=referer" target="_top">
- <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
- <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
- <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
- </div>
-
- </body>
+</body>
</html>
<ol>
<li> Create the branch using
- <pre>
- svn copy https://svn.dealii.org/trunk/ https://svn.dealii.org/branches/new-branch-name
- </pre>
+<pre>
+$ svn copy https://svn.dealii.org/trunk/ https://svn.dealii.org/branches/new-branch-name
+</pre>
<li> Either check out the new branch or switch your working copy by
- <pre>
- svn switch https://svn.dealii.org/branches/new-branch-name
- </pre>
+<pre>
+$ svn switch https://svn.dealii.org/branches/new-branch-name
+</pre>
This command assumes you are in the top level directory, the one
containing <tt>deal.II</tt> and <tt>tests</tt>
<li> After some development of the branch, if you want to merge changes
that have been made on mainline in the meantime, you can use this command:
- <pre>
-
- svn merge ^/trunk
- </pre>
+<pre>
+$ svn merge ^/trunk
+</pre>
This command will only run if you have no local changes in your working
directory for the branch, and will modify all of your files by merging
the changes made on mainline. If there are no conflicts that need to be
<meta name="keywords" content="deal dealii finite elements fem triangulation">
<meta http-equiv="content-language" content="en">
</head>
- <body>
-
- <p>
- <br />
- This page provides documentation for deal.II developers. At present, we
- have the following resources available:
- </p>
-
- <h2>Documentation</h2>
-
- <ul>
- <li> <p> Documentation of the <a href="svn.html">SVN Archive</a> and
- information on <a href="http://www.dealii.org/websvn/log.php?repname=deal.II+Repository&path=%2F&isdir=1&" target="_top">recent changes to the library</a>.
-
- <li> <p>
- <a href="cmake-internals.html">Build system internals</a>:
- This page provides implementation and development details about
- the CMake build system.
-
- <li> <p><a href="writing-documentation.html" target="body">Writing
- documentation</a>: To document the library and our
- application programs, we use
- <a href="http://www.doxygen.org/" target="_top">doxygen</a>.
- This page documents the basics of the format in
- which the documentation needs to be written in order to
- enable automatic documentation generation.
- </p>
-
- <li> <p><a href="porting.html" target="body">Porting
- <acronym>deal.II</acronym> to a new system</a>:
-
- <acronym>deal.II</acronym> uses CMake as build system
- and is fairly ISO (1998) C++ Standard compliant.
- So, porting to a reasonably <a
- href="http://www.opengroup.org/austin/">POSIX</a> compliant
- system with a reasonably ISO C++ compliant compiler shouldn't be
- much work. Other (mostly proprietary) systems might require more
- work. See the <a href="../readme.html" target="body">ReadMe</a>
- file for more information on already supported systems. This
- resource gives some hints for porting to unknown platforms.
- </p>
-
- <li> <p><a href="../doxygen/deal.II/CodingConventions.html"
- target="body">Coding conventions</a>: We try to adhere to a
- set of coding conventions to ensure that the use of different
- parts of the library is as uniform as possible. Please read
- through them if you think about contributing code.
-
- <li> <p><a href="testsuite.html" target="body">Running the testsuite</a>:
- <acronym>deal.II</acronym> has a testsuite that we run to
- make sure that our tests don't break any existing
- functionality. This page explains its use.
- </p>
- </ul>
-
- <h2>Resources</h2>
-
- <ul>
- <li> <p><a
- href="http://www.dealii.org/cgi-bin/regression_quick.pl"
- target="body">Results of regression tests:</a> Every night,
- the regression tests are run on some of our machines. The log of the
- results can be seen here.
- </p>
-
- <li> <p><a href="http://www.dealii.org//cgi-bin/build.pl">
- Results of build tests:</a> We also build the library each night on
- a variety of computers, using different compilers. The results of
- these builds is listed as well.
- </p>
-
- <li> <p><a href="http://www.math.tamu.edu/~heister/bench">
- Results of benchmarks:</a> We run a certain number of tests
- and track the performance over time.
- </p>
- </ul>
-
- <hr />
- <address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
- $Date$
- </address>
- <div class="right">
- <a href="http://validator.w3.org/check?uri=referer" target="_top">
- <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
- <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
- <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
- </div>
-
- </body>
+<body>
+
+<p>
+
+<h1>Information for Developers</h1>
+
+<br />
+This page provides documentation for deal.II developers. At present, we
+have the following resources available:
+</p>
+
+<h2>Documentation</h2>
+
+<ul>
+<li> <p> Documentation of the <a href="svn.html">SVN Archive</a> and
+ information on <a href="http://www.dealii.org/websvn/log.php?repname=deal.II+Repository&path=%2F&isdir=1&" target="_top">recent changes to the library</a>.
+
+<li> <p>
+ <a href="cmake-internals.html">Build system internals</a>:
+ This page provides implementation and development details about
+ the CMake build system.
+
+<li> <p><a href="writing-documentation.html" target="body">Writing
+ documentation</a>: To document the library and our
+ application programs, we use
+ <a href="http://www.doxygen.org/" target="_top">doxygen</a>.
+ This page documents the basics of the format in
+ which the documentation needs to be written in order to
+ enable automatic documentation generation.
+ </p>
+
+<li> <p><a href="porting.html" target="body">Porting
+ <acronym>deal.II</acronym> to a new system</a>:
+
+ <acronym>deal.II</acronym> uses CMake as build system
+ and is fairly ISO (1998) C++ Standard compliant.
+ So, porting to a reasonably <a
+ href="http://www.opengroup.org/austin/">POSIX</a> compliant
+ system with a reasonably ISO C++ compliant compiler shouldn't be
+ much work. Other (mostly proprietary) systems might require more
+ work. See the <a href="../readme.html" target="body">ReadMe</a>
+ file for more information on already supported systems. This
+ resource gives some hints for porting to unknown platforms.
+ </p>
+
+<li> <p><a href="../doxygen/deal.II/CodingConventions.html"
+ target="body">Coding conventions</a>: We try to adhere to a
+ set of coding conventions to ensure that the use of different
+ parts of the library is as uniform as possible. Please read
+ through them if you think about contributing code.
+
+<li> <p><a href="testsuite.html" target="body">Running the testsuite</a>:
+ <acronym>deal.II</acronym> has a testsuite that we run to
+ make sure that our tests don't break any existing
+ functionality. This page explains its use.
+ </p>
+</ul>
+
+<h2>Resources</h2>
+
+<ul>
+<li> <p><a
+ href="http://www.dealii.org/cgi-bin/regression_quick.pl"
+ target="body">Results of regression tests:</a> Every night,
+ the regression tests are run on some of our machines. The log of the
+ results can be seen here.
+ </p>
+
+<li> <p><a href="http://www.dealii.org//cgi-bin/build.pl">
+ Results of build tests:</a> We also build the library each night on
+ a variety of computers, using different compilers. The results of
+ these builds is listed as well.
+ </p>
+
+<li> <p><a href="http://www.math.tamu.edu/~heister/bench">
+ Results of benchmarks:</a> We run a certain number of tests
+ and track the performance over time.
+ </p>
+</ul>
+
+<hr />
+<address>
+ <a href="../authors.html" target="body">The deal.II Authors</a>
+ $Date$
+</address>
+<div class="right">
+ <a href="http://validator.w3.org/check?uri=referer" target="_top">
+ <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
+ <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
+ <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
+</div>
+
+</body>
</html>
function/variable declaration, global function or namespace, may
be preceded by a comment of the following form:
</p>
- <pre>
- /**
- * This is an example documentation.
- *
- * @author Wolfgang Bangerth, 2000
- */
- class TestClass
- {
- public:
- /**
- * Constructor
- */
- TestClass ();
-
- /**
- * Example function
- */
- virtual void test () const = 0;
-
- /**
- * Member variable
- */
- const unsigned int abc;
- };
- </pre>
+<pre>
+/**
+ * This is an example documentation.
+ *
+ * @author Wolfgang Bangerth, 2000
+ */
+class TestClass
+{
+ public:
+ /**
+ * Constructor
+ */
+ TestClass ();
+
+ /**
+ * Example function
+ */
+ virtual void test () const = 0;
+
+ /**
+ * Member variable
+ */
+ const unsigned int abc;
+};
+</pre>
<p>
<acronym>doxygen</acronym> will then generate a page for the class
<code>TestClass</code> and document each of the member functions
<li> <em>Itemized lists:</em>
By writing comments like the following,
- <pre>
- /**
- * <ul>
- * <li> foo
- * <li> bar
- * </ul>
- */
- </pre>
+<pre>
+/**
+ * <ul>
+ * <li> foo
+ * <li> bar
+ * </ul>
+ */
+</pre>
you can get itemized lists both in the online and printed
documentation:
<ul>
<p>
If you write comments like this,
</p>
- <pre>
- /**
- * @verbatim
- * void foobar ()
- * {
- * i = 0;
- * }
- * @endverbatim
- */
- </pre>
+<pre>
+/**
+ * @verbatim
+ * void foobar ()
+ * {
+ * i = 0;
+ * }
+ * @endverbatim
+ */
+</pre>
you will get the lines between the verbatim environment with
the same formatting and in typewriter font:
- <pre>
- void foobar ()
- {
- i = 0;
- }
- </pre>
+<pre>
+void foobar ()
+{
+ i = 0;
+}
+</pre>
This is useful if you want to include small sample code snippets
into your documentation. In particular, it is important that
the formatting is preserved, which is not the case for all
preprocessor symbol <tt>DOXYGEN</tt> when running
<acronym>doxygen</acronym>. Therefore, the following template can be
used to avoid documentation:</p>
- <pre>
- documented code here
+<pre>
+/* documented code here */
- #ifndef DOXYGEN
+#ifndef DOXYGEN
- code here is compiled, but ignored by doxygen
+/* code here is compiled, but ignored by doxygen */
- #endif // DOXYGEN
- </pre>
+#endif // DOXYGEN
+</pre>
</ul>
<h3>Code examples for the usage of single classes</h3>
documentation. It can be grouped into the following categories:
</p>
-
-<table align="center" width="70%">
- <tr>
- <th width="40%"><a href="users/index.html"target="_top">Information for users</a></th>
- <td></td>
- <th width="40%"><a href="developers/index.html" target="_top">Information for developers</a></th>
- </tr>
-
- <tr>
- <td>
+<div style="text-align: center;">
+ <div style="clear: both; text-align: center; max-width: 580px; margin: auto;">
+ <div class="infobox">
+ <a href="users/index.html"target="_top">Information for users</a>
<div style="border:1px solid #aaa; background-color: #f9f9f9;
- padding: 5px; font-size: 88%;">
- <ol>
- <li><a href="readme.html" target="body">README and
- installation instructions</a></li>
- <li><a href="users/cmake.html" target="body">CMake documentation</a></li>
- <li><a href="users/cmakelists.html" target="body">CMake in user projects</a></li>
- <li><a href="doxygen/tutorial/index.html" target="_top">Tutorial</a></li>
- <li><a href="doxygen/deal.II/index.html" target="_top">Manual</a></li>
- <li><a href="http://www.math.tamu.edu/~bangerth/videos.html" target="_top">Video lectures</a></li>
- <li><a href="reports/index.html" target="body">Technical reports</a></li>
- <li><a href="publications/index.html" target="body">Publications</a></li>
- </ol>
+ padding: 5px; font-size: 88%; text-align: left;">
+ <ol>
+ <li><a href="readme.html" target="body">README and
+ installation instructions</a></li>
+ <li><a href="users/cmake.html" target="body">CMake documentation</a></li>
+ <li><a href="users/cmakelists.html" target="body">CMake in user projects</a></li>
+ <li><a href="doxygen/tutorial/index.html" target="_top">Tutorial</a></li>
+ <li><a href="doxygen/deal.II/index.html" target="_top">Manual</a></li>
+ <li><a href="http://www.math.tamu.edu/~bangerth/videos.html" target="_top">Wolfgang's lectures</a></li>
+ <li><a href="reports/index.html" target="body">Technical reports</a></li>
+ <li><a href="publications/index.html" target="body">Publications</a></li>
+ </ol>
</div>
- </td>
-
- <td></td>
+ </div>
- <td>
+ <div class="infobox">
+ <a href="developers/index.html" target="_top">Information for developers</a>
<div style="border:1px solid #aaa; background-color: #f9f9f9;
- padding: 5px; font-size: 88%;">
- <ol>
- <li><a href="developers/svn.html" target="body">SVN Archive</a></li>
- <li><a href="developers/cmake-internals.html" target="body">CMake internals</a></li>
- <li><a href="developers/writing-documentation.html" target="body">Writing documentation</a></li>
- <li><a href="developers/porting.html" target="body">Porting</a></li>
- <li><a href="doxygen/deal.II/CodingConventions.html" target="body">Coding conventions</a></li>
- <li><a href="developers/testsuite.html" target="body">Testsuite</a></li>
- </ol>
+ padding: 5px; font-size: 88%; text-align: left;">
+ <ol>
+ <li><a href="developers/svn.html" target="body">SVN Archive</a></li>
+ <li><a href="developers/cmake-internals.html" target="body">CMake internals</a></li>
+ <li><a href="developers/writing-documentation.html" target="body">Writing documentation</a></li>
+ <li><a href="developers/porting.html" target="body">Porting</a></li>
+ <li><a href="doxygen/deal.II/CodingConventions.html" target="body">Coding conventions</a></li>
+ <li><a href="developers/testsuite.html" target="body">Testsuite</a></li>
+ </ol>
</div>
- </td>
- </tr>
-</table>
-
-<br>
-<br>
+ </div>
+ </div>
+</div>
+<div style="clear: both;">
+ <br>
<hr />
<address>
<a href="authors.html" target="body">The deal.II Authors</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
</div>
+</div>
</body>
</html>
<a href="doxygen/tutorial/index.html" target="_top">Tutorial</a><br />
<a href="doxygen/deal.II/index.html" target="_top">Manual</a><br />
<a href="http://www.math.tamu.edu/~bangerth/videos.html"
- target="_top">Video lectures</a><br />
+ target="_top">Wolfgang's lectures</a><br />
</p>
<hr>
//
body {
- background-image: none;
- background-color: #ECF0F4;
- color: Black;
- margin: 10px;
- padding: 0;
- font-family: sans-serif;
- counter-reset: section;
+ background-image: none;
+ background-color: #ECF0F4;
+ color: Black;
+ margin: 10px;
+ padding: 0;
+ font-family: sans-serif;
+ counter-reset: section;
}
body.title {
- background-color: #CCD8E8;
- margin: 0;
- padding: 2px;
+ background-color: #CCD8E8;
+ margin: 0;
+ padding: 2px;
}
body.gallery {
- background-color: #CCD8E8;
- margin: 0;
- padding: 2px;
+ background-color: #CCD8E8;
+ margin: 0;
+ padding: 2px;
}
body.navbar {
- background-color: #CCD8E8;
- margin: 2px;
- padding: 2px;
- font-family: sans-serif;
- font-size: 12px;
+ background-color: #CCD8E8;
+ margin: 2px;
+ padding: 2px;
+ font-family: sans-serif;
+ font-size: 12px;
}
div.toc {
}
frameset {
- background-color: white;
- border-color: black;
- border: 2px;
+ background-color: white;
+ border-color: black;
+ border: 2px;
}
a:hover { text-decoration: underline; }
}
h1.head {
- position:relative;
+ position:relative;
text-align:center;
- font-weight: bold;
- color:black;
- padding-top: 0;
- padding-bottom: 0;
- border-bottom: 0;
+ font-weight: bold;
+ color:black;
+ padding-top: 0;
+ padding-bottom: 0;
+ border-bottom: 0;
}
h1, h2, h3, h4, h5, h6 {
}
.figure { font-weight: bold;
- font-size: larger;
- }
+ font-size: larger;
+ }
.pagetoc {}
.chapter_title {}
span.parhead {
- font-weight: bold;
-}
+ font-weight: bold;
+}
span.example {
- font-weight: bold;
- font-style: italic;
+ font-weight: bold;
+ font-style: italic;
}
pre {
- padding: 0em;
- text-align: left;
- text-indent: 0;
- border: 1px dashed #2f6fab;
- color: Black;
- background-color: #f9f9f9;
- line-height: 1.1em;
-}
-
+ padding: 1em;
+ text-align: left;
+ text-indent: 0;
+ border: 1px dashed #2f6fab;
+ color: Black;
+ background-color: #f9f9f9;
+ line-height: 1.1em;
+}
+
pre.cmake {
- padding: 1em;
- text-align: left;
- text-indent: 0;
- border: 1px solid #d06fab;
- color: Black;
- background-color: #f9f9f9;
- line-height: 1.1em;
-}
-
+ padding: 1em;
+ text-align: left;
+ text-indent: 0;
+ border: 1px solid #d06fab;
+ color: Black;
+ background-color: #f9f9f9;
+ line-height: 1.1em;
+}
+
pre.sample {
- padding: 1em;
- text-align: left;
- text-indent: 0;
- border: 1px dashed #2f6fab;
- color: Black;
- background-color: #f9f9f9;
- line-height: 1.1em;
-}
-
+ padding: 1em;
+ text-align: left;
+ text-indent: 0;
+ border: 1px dashed #2f6fab;
+ color: Black;
+ background-color: #f9f9f9;
+ line-height: 1.1em;
+}
+
table.navbar { }
table.tutorial {
color: black;
}
td.build {
- text-align: center;
- vertical-align: middle;
- font-size: small;
+ text-align: center;
+ vertical-align: middle;
+ font-size: small;
}
}
.weak {
- color: #808080;
- text-decoration: line-through;
+ color: #808080;
+ text-decoration: line-through;
}
.todo:before {
}
.deprecated {
- text-decoration: line-through;
+ text-decoration: line-through;
}
.attention {
- color: #f00080;
- font-weight: bold;
+ color: #f00080;
+ font-weight: bold;
}
.shout {
- color: #e000ff;
- text-decoration: blink;
- font-weight: bold;
+ color: #e000ff;
+ text-decoration: blink;
+ font-weight: bold;
+}
+
+div.border {
+ clear: both;
+ margin: auto;
+}
+
+div.infobox {
+ float: left;
+ width: 250px;
+ text-align: center;
+ margin-top: 1em;
+ margin-left: 20px;
+ margin-right: 20px;
}
necessary; <i>values for variables that are already in the cache
are not re-evaluated</i>. This means that calling <code>cmake</code>
a second time without any arguments at all in a situation like this
- <pre>
-
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/path/install/dir ../deal.II
- cmake ../deal.II
- </pre>
+<pre class="cmake">
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=/path/install/dir ../deal.II
+cmake ../deal.II
+</pre>
has no effect: In particular, the <code>CMAKE_INSTALL_PREFIX</code>
specified on the first invocation of <code>cmake</code> is
cached and therefore still valid after the second invocation
configuration parameters and thereby interact with the configuration
system in rather powerful (and, possibly, destructive) ways. For
example, the following commands
- <pre>
-
- mkdir build
- cd build
- cmake ../deal.II
- ccmake
- </pre>
+<pre class="cmake">
+mkdir build
+cd build
+cmake ../deal.II
+ccmake
+</pre>
first configure a bare-bone setup and then call
the <code>ccmake</code> program -- an interactive editor for the
cached variables. Similarly,
- <pre>
-
- mkdir build
- cd build
- cmake ../deal.II
- cmake -D<OPTION>=<VALUE> [...] ../deal.II
- </pre>
+<pre class="cmake">
+mkdir build
+cd build
+cmake ../deal.II
+cmake -D<OPTION>=<VALUE> [...] ../deal.II
+</pre>
sets a variable the second time around without destroying all
the configuration that has happened the first time around. Likewise,
- <pre>
-
- mkdir build
- cd build
- cmake ../deal.II
- cmake -DDEAL_II_WITH_METIS=OFF .
- cmake -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=/path/to/trilinos .
- </pre>
+<pre class="cmake">
+mkdir build
+cd build
+cmake ../deal.II
+cmake -DDEAL_II_WITH_METIS=OFF .
+cmake -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=/path/to/trilinos .
+</pre>
switches off support for the METIS library that may have been
automatically detected during the first invocation of
<code>cmake</code> and enables support for Trilinos by enabling
<p>
A cached variable can be set on the command line via
- <pre>
-
- cmake -D<VARIABLE>=<VALUE> .
- </pre>
+<pre class="cmake">
+cmake -D<VARIABLE>=<VALUE> .
+</pre>
Cached variables can be removed from the cache via
- <pre>
-
- cmake -U<VARIABLE> .
- </pre>
+<pre class="cmake">
+cmake -U<VARIABLE> .
+</pre>
It is possible to use <code>-U</code> together with a globbing
expression. E.g. to remove the current feature configuration and
rerun the autodetection one can invoke
- <pre>
-
- cmake -U"DEAL_II_WITH_*" .
- </pre>
+<pre class="cmake">
+cmake -U"DEAL_II_WITH_*" .
+</pre>
</p>
<a name="operatingccmake"></a>
A very convenient way to alter the configuration is to use the graphical
user interface <code>ccmake</code> to the
variables <code>cmake</code> stores upon running. It can be invoked via
- <pre>
-
- ccmake .
- </pre>
+<pre class="cmake">
+ccmake .
+</pre>
or by
- <pre>
-
- make edit_cache
- </pre>
+<pre class="cmake">
+make edit_cache
+</pre>
A reconfiguration (without editing the cache) can be run via
- <pre>
-
- make rebuild_cache
- </pre>
+<pre class="cmake">
+make rebuild_cache
+</pre>
</p>
<a name="operatingshortcuts"></a>
<p>
All variables starting with <code>WITH_</code> will be automatically
renamed to <code>DEAL_II_WITH_*</code>. So, it suffices to specify
- <pre>
-
- cmake -DWITH_MPI=ON <...>
- </pre>
+<pre class="cmake">
+cmake -DWITH_MPI=ON <...>
+</pre>
instead of the longer
- <pre>
-
- cmake -DDEAL_II_WITH_MPI=ON <...>
- </pre>
+<pre class="cmake">
+cmake -DDEAL_II_WITH_MPI=ON <...>
+</pre>
The same holds for all variables starting with <code>COMPONENT_</code>
and all individual component names: <code>COMPAT_FILES</code>,
<code>DOCUMENTATION</code>, <code>EXAMPLES</code>,
<p> The current list of primary build targets can be queried via
<code>make info</code>:
- <pre>
-
- ###
- #
- # The following targets are available (invoke via $ make <target>):
- #
- # all - compiles the library and all enabled components
- # clean - removes all generated files
- # install - installs into CMAKE_INSTALL_PREFIX
- # help - prints a list of valid top level targets
- # info - prints this help message
- #
- # edit_cache - runs ccmake for changing (cached) configuration variables
- # and reruns the configure and generate phases of CMake
- # rebuild_cache - reruns the configure and generate phases of CMake
- #
- # compat_files - builds and installs the 'compat_files' component
- # documentation - builds and installs the 'documentation' component
- # examples - builds and installs the 'examples' component
- # library - builds and installs the 'library' component
- # mesh_converter - builds and installs the 'mesh_converter' component
- # parameter_gui - builds and installs the 'parameter_gui' component
- #
- # test - runs a minimal set of tests
- #
- # setup_test - sets up the testsuite subprojects
- # clean_test - runs the 'clean' target in every testsuite subproject
- # prune_test - removes all testsuite subprojects
- #
- ###
- </pre>
+<pre class="cmake">
+###
+#
+# The following targets are available (invoke via $ make <target>):
+#
+# all - compiles the library and all enabled components
+# clean - removes all generated files
+# install - installs into CMAKE_INSTALL_PREFIX
+# help - prints a list of valid top level targets
+# info - prints this help message
+#
+# edit_cache - runs ccmake for changing (cached) configuration variables
+# and reruns the configure and generate phases of CMake
+# rebuild_cache - reruns the configure and generate phases of CMake
+#
+# compat_files - builds and installs the 'compat_files' component
+# documentation - builds and installs the 'documentation' component
+# examples - builds and installs the 'examples' component
+# library - builds and installs the 'library' component
+# mesh_converter - builds and installs the 'mesh_converter' component
+# parameter_gui - builds and installs the 'parameter_gui' component
+#
+# test - runs a minimal set of tests
+#
+# setup_test - sets up the testsuite subprojects
+# clean_test - runs the 'clean' target in every testsuite subproject
+# prune_test - removes all testsuite subprojects
+#
+###
+</pre>
<a name="buildinformation"></a>
A configuration run of <code>cmake</code> (or <code>ccmake</code>)
writes a short summary of the current configuration into
<code>CMAKE_BUILD_DIR/summary.log</code>:
- <pre>
-
- ###
- #
- # deal.II configuration:
- # CMAKE_BUILD_TYPE: DebugRelease
- # BUILD_SHARED_LIBS: ON
- # CMAKE_INSTALL_PREFIX: /tmp/deal.II/install
- # CMAKE_SOURCE_DIR: /tmp/deal.II/deal.II (Version 8.1.pre)
- # CMAKE_BINARY_DIR: /tmp/deal.II/build
- # CMAKE_CXX_COMPILER: GNU 4.7.3 on platform Linux x86_64
- # /usr/bin/c++
- #
- # Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
- # ( DEAL_II_WITH_64BIT_INDICES = OFF )
- # DEAL_II_WITH_ARPACK set up with external dependencies
- # DEAL_II_WITH_BOOST set up with external dependencies
- # [...]
- #
- # Component configuration:
- # DEAL_II_COMPONENT_COMPAT_FILES
- # ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
- # DEAL_II_COMPONENT_EXAMPLES
- # DEAL_II_COMPONENT_MESH_CONVERTER
- # ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )
- #
- # Detailed information (compiler flags, feature configuration) can be found in detailed.log
- #
- # Run $ make info to print a help message with a list of top level targets
- #
- ###
- </pre>
+<pre class="cmake">
+###
+#
+# deal.II configuration:
+# CMAKE_BUILD_TYPE: DebugRelease
+# BUILD_SHARED_LIBS: ON
+# CMAKE_INSTALL_PREFIX: /tmp/deal.II/install
+# CMAKE_SOURCE_DIR: /tmp/deal.II/deal.II (Version 8.1.pre)
+# CMAKE_BINARY_DIR: /tmp/deal.II/build
+# CMAKE_CXX_COMPILER: GNU 4.7.3 on platform Linux x86_64
+# /usr/bin/c++
+#
+# Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
+# ( DEAL_II_WITH_64BIT_INDICES = OFF )
+# DEAL_II_WITH_ARPACK set up with external dependencies
+# DEAL_II_WITH_BOOST set up with external dependencies
+# [...]
+#
+# Component configuration:
+# DEAL_II_COMPONENT_COMPAT_FILES
+# ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
+# DEAL_II_COMPONENT_EXAMPLES
+# DEAL_II_COMPONENT_MESH_CONVERTER
+# ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )
+#
+# Detailed information (compiler flags, feature configuration) can be found in detailed.log
+#
+# Run $ make info to print a help message with a list of top level targets
+#
+###
+</pre>
This summary is also printed at the end of the configuration phase.
It tells you about build and install directory locations, feature
configuration (whether a feature is enabled with external/internal
A more detailed version can be found in
<code>CMAKE_BUILD_DIR/detailed.log</code> that also includes detailed
information about feature configuration, e.g.
- <pre>
-
- # DEAL_II_WITH_BOOST set up with external dependencies
- # BOOST_VERSION = 1.52.0
- # BOOST_DIR =
- # Boost_INCLUDE_DIRS = /usr/include
- # Boost_LIBRARIES = /usr/lib64/libboost_serialization-mt.so;/usr/lib64/libboost_system-mt.so;
- # [...]
- </pre>
+<pre class="cmake">
+# DEAL_II_WITH_BOOST set up with external dependencies
+# BOOST_VERSION = 1.52.0
+# BOOST_DIR =
+# Boost_INCLUDE_DIRS = /usr/include
+# Boost_LIBRARIES = /usr/lib64/libboost_serialization-mt.so;/usr/lib64/libboost_system-mt.so;
+# [...]
+</pre>
If this information is not sufficient, you might want to have a look
at the following files in <code>CMAKE_BUILD_DIR</code>
<ul>
<code>cmake</code> (or <code>ccmake</code>) from the designated build
directory, so for example (a build directory under the source
directory):
- <pre>
-
- $ mkdir build
- $ cd build
- $ cmake ..
- </pre>
+<pre class="cmake">
+$ mkdir build
+$ cd build
+$ cmake ..
+</pre>
The big advantage is that source files and intermediate files are
strictly separated (highly desired for version control) and that you
can have multiple build directories (with different configuration) at
<p>
<b>Note:</b> However, under rare occasions an in-source build might be
useful or needed , so it is supported
- <pre>
-
- $ cmake .
- </pre>
+<pre class="cmake">
+$ cmake .
+</pre>
But we highly discourage it!
</p>
Cmake is a <i>Makefile Generator</i>. This allows to switch the
generator that is used to something different. If you for example want
to automatically generate an Eclipse project of deal.II, you can run
- <pre>
-
- $ cmake -G"Eclipse CDT4 - Unix Makefiles" [...]
- </pre>
+<pre class="cmake">
+$ cmake -G"Eclipse CDT4 - Unix Makefiles" [...]
+</pre>
and load up the build directory as a project directly into Eclipse.
Have a look at the <a href="https://code.google.com/p/dealii/w/list"
target="_top">Wiki</a> for more information.
<p>
An interesting alternative to (GNU) Make might also be <a
href="http://martine.github.io/ninja/">Ninja</a>. Configure via
- <pre>
-
- $ cmake -GNinja [...]
- </pre>
+<pre class="cmake">
+$ cmake -GNinja [...]
+</pre>
and run <code>ninja</code> instead of <code>make</code>.
</p>
If you want to only generate, compile and install a specific
component (most notably the documentation) you can use one of the
following top level targets:
- <pre>
-
- compat_files - builds and installs the 'compat_files' component
- documentation - builds and installs the 'documentation' component
- examples - builds and installs the 'examples' component
- library - builds and installs the 'library' component
- mesh_converter - builds and installs the 'mesh_converter' component
- parameter_gui - builds and installs the 'parameter_gui' component
- </pre>
+ <pre class="cmake">
+compat_files - builds and installs the 'compat_files' component
+documentation - builds and installs the 'documentation' component
+examples - builds and installs the 'examples' component
+library - builds and installs the 'library' component
+mesh_converter - builds and installs the 'mesh_converter' component
+parameter_gui - builds and installs the 'parameter_gui' component
+</pre>
<a name="configure"></a>
<p>
Specifically, the following variables exist (the list may grow
over time, but names are standardized):
- <pre>
-
- DEAL_II_WITH_ARPACK
- DEAL_II_WITH_BOOST
- DEAL_II_WITH_FUNCTIONPARSER
- DEAL_II_WITH_LAPACK
- DEAL_II_WITH_METIS
- DEAL_II_WITH_MUMPS
- DEAL_II_WITH_MPI
- DEAL_II_WITH_NETCDF
- DEAL_II_WITH_P4EST
- DEAL_II_WITH_PETSC
- DEAL_II_WITH_SLEPC
- DEAL_II_WITH_THREADS
- DEAL_II_WITH_TRILINOS
- DEAL_II_WITH_UMFPACK
- DEAL_II_WITH_ZLIB
- DEAL_II_WITH_64BIT_INDICES
- </pre>
+<pre class="cmake">
+DEAL_II_WITH_ARPACK
+DEAL_II_WITH_BOOST
+DEAL_II_WITH_FUNCTIONPARSER
+DEAL_II_WITH_LAPACK
+DEAL_II_WITH_METIS
+DEAL_II_WITH_MUMPS
+DEAL_II_WITH_MPI
+DEAL_II_WITH_NETCDF
+DEAL_II_WITH_P4EST
+DEAL_II_WITH_PETSC
+DEAL_II_WITH_SLEPC
+DEAL_II_WITH_THREADS
+DEAL_II_WITH_TRILINOS
+DEAL_II_WITH_UMFPACK
+DEAL_II_WITH_ZLIB
+DEAL_II_WITH_64BIT_INDICES
+</pre>
They all have standard meaning with the exception of
two:
<ul>
<p>
Paths specified via <code>CMAKE_PREFIX_PATH</code> take
precedence, e.g. with
- <pre>
-
- cmake -DCMAKE_PREFIX_PATH=~/workspace/local ../deal.II
- </pre>
+<pre class="cmake">
+make -DCMAKE_PREFIX_PATH=~/workspace/local ../deal.II
+</pre>
libraries from <code>~/workspace/local</code> will be
preferred for dependency resolution.
</p>
<p>
Hints given by <code><library>_DIR</code> via command
line or environment for <i>some</i> libraries:
- <pre>
-
- cmake -DP4EST_DIR=~/workspace/p4est-install/ ../deal.II
- </pre>
+<pre class="cmake">
+make -DP4EST_DIR=~/workspace/p4est-install/ ../deal.II
+</pre>
or
- <pre>
-
- export P4EST_DIR=~/workspace/p4est-install/
- cmake ../deal.II
- </pre>
+<pre class="cmake">
+export P4EST_DIR=~/workspace/p4est-install/
+cmake ../deal.II
+</pre>
where <code>-D<library>_DIR</code> takes precedence
over environment.
</p>
<p>
Currently, the following variables will be considered:
- <pre>
-
- ARPACK_DIR,
- BOOST_DIR,
- HDF5_DIR,
- LAPACK_DIR (and BLAS_DIR),
- METIS_DIR,
- MUMPS_DIR (and SCALAPACK_DIR, BLACS_DIR),
- P4EST_DIR (and SC_DIR),
- PETSC_DIR and PETSC_ARCH (forming ${PETSC_DIR}/${PETSC_ARCH}),
- SLEPC_DIR (forming ${SLEPC_DIR}/${PETSC_ARCH}),
- TBB_DIR,
- TRILINOS_DIR,
- UMFPACK_DIR and SUITESPARSE_DIR (AMD_DIR, CHOLMOD_DIR, COLAMD_DIR, SUITESPARSECONFIG_DIR)
- </pre>
+<pre class="cmake">
+ARPACK_DIR,
+BOOST_DIR,
+HDF5_DIR,
+LAPACK_DIR (and BLAS_DIR),
+METIS_DIR,
+MUMPS_DIR (and SCALAPACK_DIR, BLACS_DIR),
+P4EST_DIR (and SC_DIR),
+PETSC_DIR and PETSC_ARCH (forming ${PETSC_DIR}/${PETSC_ARCH}),
+SLEPC_DIR (forming ${SLEPC_DIR}/${PETSC_ARCH}),
+TBB_DIR,
+TRILINOS_DIR,
+UMFPACK_DIR and SUITESPARSE_DIR (AMD_DIR, CHOLMOD_DIR, COLAMD_DIR, SUITESPARSECONFIG_DIR)
+</pre>
</p>
<li>
<code>Find<Module></code> mechanism may be set,
hinted or overwritten directly (variable names are highly
dependent on the actual library). You can get a list via
- <pre>
-
- make edit_cache
- </pre>
+<pre class="cmake">
+make edit_cache
+</pre>
and entering advanced configuration mode by pressing [t].
Variables that could not be determined are suffixed with
<code>-NOTFOUND</code> and may be set by hand.
need different revisions sometimes, in your own library directory,
you may receive an error message of the form:</p>
-<pre>
-
- CMake Warning at source/CMakeLists.txt:65 (ADD_LIBRARY):
- Cannot generate a safe runtime search path for target deal_II.g because
- files in some directories may conflict with libraries in implicit
- directories:
-
- runtime library [libtbb.so.2] in /usr/lib may be hidden by files in:
- /my/private/lib
+<pre class="cmake">
+CMake Warning at source/CMakeLists.txt:65 (ADD_LIBRARY):
+ Cannot generate a safe runtime search path for target deal_II.g because
+ files in some directories may conflict with libraries in implicit
+ directories:
- Some of these libraries may not be found correctly.
+ runtime library [libtbb.so.2] in /usr/lib may be hidden by files in:
+ /my/private/lib
+ Some of these libraries may not be found correctly.
</pre>
<p>This is not a problem of CMake or deal.II, but rather a general
<code>FIND_PACKAGE(...)</code> mechanism.
In this case you can set by hand:
- <pre>
-
- cmake -D<feature>_FOUND=true \
- -D<feature>_LIBRARIES="library;and;complete;link;interface" \
- ( -D<feature>_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
- -D<feature>_LINKER_FLAGS="..." \
- -D<feature>_<...depending on library...> )
- </pre>
+<pre class="cmake">
+cmake -D<feature>_FOUND=true \
+ -D<feature>_LIBRARIES="library;and;complete;link;interface" \
+ ( -D<feature>_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
+ -D<feature>_LINKER_FLAGS="..." \
+ -D<feature>_<...depending on library...> )
+</pre>
The first define ensures that <code>cmake</code> does not
call the corresponding <code>Find<lib>.cmake</code> module.
configuration:
(Here, these libraries have been compiled with the gfortran compiler
and need its support library):
- <pre>
-
- cmake -DLAPACK_FOUND=true \
- -DLAPACK_LIBRARIES="/tmp/petsc-3.3-p6/arch-linux2-c-debug/lib/libflapack.a;/tmp/petsc-3.3-p6/arch-linux2-c-debug/lib/libfblas.a" \
- -DLAPACK_LINKER_FLAGS="-lgfortran -lm"
- </pre>
+<pre class="cmake">
+cmake -DLAPACK_FOUND=true \
+ -DLAPACK_LIBRARIES="/tmp/petsc-3.3-p6/arch-linux2-c-debug/lib/libflapack.a;/tmp/petsc-3.3-p6/arch-linux2-c-debug/lib/libfblas.a" \
+ -DLAPACK_LINKER_FLAGS="-lgfortran -lm"
+</pre>
You can set these values on the command line, with <code>ccmake</code>
or by providing an initial cache file, see
</p>
Compilers can be switched either by command line or by setting
<code>CMAKE_(C|CXX|Fortran)_COMPILER</code>:
- <pre>
+<pre class="cmake">
+CC=mpicc CXX=mpicxx FC=mpif90 cmake <...>
- CC=mpicc CXX=mpicxx cmake <...>
-
- cmake -DCMAKE_C_COMPILER="mpicc" -DCMAKE_CXX_COMPILER="mpicxx" -DCMAKE_Fortran_COMPILER="mpif90" <...>
- </pre>
+cmake -DCMAKE_C_COMPILER="mpicc" -DCMAKE_CXX_COMPILER="mpicxx" -DCMAKE_Fortran_COMPILER="mpif90" <...>
+</pre>
Please note that
<ul>
<li>
<li>
Override the default configuration by setting the following
cached variables:
- <pre>
-
- CMAKE_CXX_FLAGS - used during all builds
- DEAL_II_CXX_FLAGS_DEBUG - additional flags for the debug library
- DEAL_II_CXX_FLAGS_RELEASE - additional flags for the release library
- </pre>
+<pre class="cmake">
+CMAKE_CXX_FLAGS - used during all builds
+DEAL_II_CXX_FLAGS_DEBUG - additional flags for the debug library
+DEAL_II_CXX_FLAGS_RELEASE - additional flags for the release library
+</pre>
The content of the cached variables will be preserved
and added <i>to the end</i> of the default compiler flags,
hence providing the possibility for overriding a flag. E.g.:
<code>-Wsign-compare</code>, set by the build system, can be
overwritten by specifying:
- <pre>
-
- cmake -DCMAKE_CXX_FLAGS="-Wno-sign-compare" <...>
- </pre>
+<pre class="cmake">
+cmake -DCMAKE_CXX_FLAGS="-Wno-sign-compare" <...>
+</pre>
<li>
Set the corresponding environment variables: <code>CFLAGS</code>,
the location, where the <acronym>deal.II</acronym> library will be
installed when invoking <code>make install</code> to is set with the
help of
- <pre>
-
- CMAKE_INSTALL_PREFIX
- </pre>
+<pre class="cmake">
+CMAKE_INSTALL_PREFIX
+</pre>
Please note that depending on whether
<code>DEAL_II_COMPONENT_COMPAT_FILES</code> is set, there will be
<ul>
<li>
With <code>DEAL_II_COMPONENT_COMPAT_FILES=ON</code>:
- <pre>
-
- ${CMAKE_INSTALL_PREFIX}/
- bin
- cmake/macros
- common
- common/scripts
- doc
- examples
- include
- lib
- lib/cmake/deal.II
- </pre>
+<pre class="cmake">
+${CMAKE_INSTALL_PREFIX}/
+ bin
+ cmake/macros
+ common
+ common/scripts
+ doc
+ examples
+ include
+ lib
+ lib/cmake/deal.II
+</pre>
<li>
With <code>DEAL_II_COMPONENT_COMPAT_FILES=OFF</code>:
- <pre>
-
- ${CMAKE_INSTALL_PREFIX}/
- bin
- include
- lib${LIB_SUFFIX}
- lib${LIB_SUFFIX}/cmake/deal.II
- share/deal.II/
- share/deal.II/cmake/macros
- share/deal.II/examples
- share/doc/deal.II/html
- </pre>
+<pre class="cmake">
+${CMAKE_INSTALL_PREFIX}/
+ bin
+ include
+ lib${LIB_SUFFIX}
+ lib${LIB_SUFFIX}/cmake/deal.II
+ share/deal.II/
+ share/deal.II/cmake/macros
+ share/deal.II/examples
+ share/doc/deal.II/html
+</pre>
</ul>
</p>
<p>
The default directory structure can be changed by by setting the
following variables:
- <pre>
-
- DEAL_II_CMAKE_MACROS_RELDIR
- DEAL_II_COMMON_RELDIR
- DEAL_II_DOCHTML_RELDIR
- DEAL_II_DOCREADME_RELDIR
- DEAL_II_EXAMPLES_RELDIR
- DEAL_II_EXECUTABLE_RELDIR
- DEAL_II_INCLUDE_RELDIR
- DEAL_II_LIBRARY_RELDIR
- DEAL_II_PROJECT_CONFIG_RELDIR
- </pre>
+<pre class="cmake">
+DEAL_II_CMAKE_MACROS_RELDIR
+DEAL_II_COMMON_RELDIR
+DEAL_II_DOCHTML_RELDIR
+DEAL_II_DOCREADME_RELDIR
+DEAL_II_EXAMPLES_RELDIR
+DEAL_II_EXECUTABLE_RELDIR
+DEAL_II_INCLUDE_RELDIR
+DEAL_II_LIBRARY_RELDIR
+DEAL_II_PROJECT_CONFIG_RELDIR
+</pre>
</p>
<h2>Initial cache file and advanced options</h2>
A sample configuration file for preloading the CMake cache with
- <pre>
-
- $ cmake -C Config.sample <...>
- </pre>
+<pre class="cmake">
+$ 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
A common scenario is that you only want to build debug or optimized
libraries. This can be achieved using the following commands in
the build directory:
- <pre>
+<pre class="cmake">
+make deal_II.g # only debug library
+make deal_II # only release (optimized) library
+make all # both
- make deal_II.g # only debug library
- make deal_II # only release (optimized) library
- make all # both
-
- make obj_grid.release # all objects in ./source/grid in release configuration
- </pre>
+make obj_grid.release # all objects in ./source/grid in release configuration
+</pre>
</p>
<p>
For a complete list of possible targets that allow even
finer-grained control, do
- <pre>
-
- make help
- </pre>
+<pre class="cmake">
+make help
+</pre>
</p>
<p>
It is frequently useful to be able to see what a particular
command does. In that case, use the following:
- <pre>
-
- make deal_II.g VERBOSE=ON
- </pre>
+<pre class="cmake">
+make deal_II.g VERBOSE=ON
+</pre>
This will show, for every command executed, the exact command
line with which it was invoked, including compiler arguments,
etc. Every command <code>cmake</code> executes starts with
<body>
<h1>How to use CMake to configure your projects with <acronym>deal.II</acronym></h1>
+<p>
+ <code>cmake</code> is controlled by input files that by convention are
+ called <code>CMakeLists.txt</code>, listing both configuration commands
+ as well as dependencies between source files and targets.
+ This page presents some <code>CMakeLists.txt</code> examples for
+ potential use in your projects. (A detailed description of the
+ <acronym>deal.II</acronym> project configuration is given in the
+ <a href="cmake.html" target="body">deal.II CMake ReadMe</a>.)
+</p>
+
<div class="toc">
<ol>
<li><a href="#cmakesimple">Simple <code>CMakeLists.txt</code></a>
</ol>
</div>
-<p>
- <code>cmake</code> is the configuration and build tool we use
- in <acronym>deal.II</acronym>. Its advantage is not only that it makes
- configuration of <acronym>deal.II</acronym> itself simpler across
- platforms (compared to the older <code>autoconf/make</code> combination)
- but also that it <i>exports</i> information about the deal.II
- configuration that makes it particularly simple for projects
- using <acronym>deal.II</acronym> to configure and link against it.
-</p>
-
-<p>
- <code>cmake</code> is controlled by input files that by convention are
- called <code>CMakeLists.txt</code>, listing both configuration commands
- as well as dependencies between source files and targets.
- This page presents some <code>CMakeLists.txt</code> examples for
- potential use in your projects. (A detailed description of the
- <acronym>deal.II</acronym> project configuration is given in the
- <a href="cmake.html" target="body">deal.II CMake ReadMe</a>.)
-</p>
-
<a name="cmakesimple"></a>
<h2>Simple CMakeLists.txt</h2>
the <acronym>deal.II</acronym> directory tree.
The CMake build system sets up the following compatibility files (if
<code>DEAL_II_COMPONENT_COMPAT_FILES</code> is set, which is default):
- <pre>
-
- ${CMAKE_INSTALL_PREFIX}
- ./common/Make.global_options
- ./common/scripts/expand_instantiations
- ./common/scripts/make_dependencies
- ./common/scripts/report_features
- </pre>
+<pre>
+${CMAKE_INSTALL_PREFIX}/
+ common/Make.global_options
+ common/scripts/expand_instantiations
+ common/scripts/make_dependencies
+ common/scripts/report_features
+</pre>
Therefore, it should be sufficient to set <code>D</code> in the old
user Makefiles to:
- <pre>
-
- D=/path/install/dir
- </pre>
+<pre>
+D=/path/install/dir
+</pre>
where <code>/path/install/dir</code> is the directory set up via
<code>CMAKE_INSTALL_PREFIX</code> (the path
<acronym>deal.II</acronym> was installed to).
<li>Once your <code>deal.tag</code> file is in a location where
Doxygen can find it, add the following line to your Doxygen
configuration file:
- <pre>
-
+<pre>
TAGFILES = deal.tag=http://www.dealii.org/X.Y.Z/doxygen/deal.II
-
</pre>
where <code>X.Y.Z</code> refers to the release number for which
you downloaded the tag file.
<a href="../doxygen/tutorial/index.html" target="_top">Tutorial</a><br />
<a href="../doxygen/deal.II/index.html" target="_top">Manual</a><br />
<a href="http://www.math.tamu.edu/~bangerth/videos.html"
- target="_top">Video lectures</a><br />
+ target="_top">Wolfgang's lectures</a><br />
</p>
<hr>
<meta name="keywords" content="deal dealii finite elements fem triangulation">
<meta http-equiv="content-language" content="en">
</head>
- <body>
-
- <p>
- <br />
- This page gathers some information on developing programs based on
- <acronym>deal.II</acronym>, as well as on how to configure and use
- <acronym>deal.II</acronym>. At present, we have the following resources
- available:
- </p>
-
-
- <h2>Documentation</h2>
-
- <ul>
-
- <li> <p>
- <a href="cmake.html">deal.II CMake documentation</a>:
- This page provides extensive information about configuration and
- installation with the CMake build system.
-
- <li> <p><a href="cmakelists.html" target="body">Using CMake and
- <acronym>deal.II</acronym> in a user project</a>:
- This page covers how to use CMake in your own project.
- An overview of how to retrieve necessary information
- from a <acronym>deal.II</acronym> installation as well as how to
- write a <code>CMakeLists.txt</code> for a client project is given.
- </p>
-
- <li> <p><a href="doxygen.html">Linking your online documentation
- to the deal.II online manual</a>: After spending a lot of time
- writing good documentation for your code and putting it online,
- here we explain how to put links to the deal.II online manual into
- your documentation, so that readers can click through.
- </p>
-
- <li> <p><a href="https://code.google.com/p/dealii/issues/list" target="_top">Bugs</a>:
- Though well tested, <acronym>deal.II</acronym> certainly has
- bugs. If you want to report a bug (or enhancement request),
- go to the <a href="https://code.google.com/p/dealii/issues/list"
- target="_top">bug tracking system</a> and enter a new ticket
- for your issue.
- </p>
-
- </ul>
-
-
- <h2>Tutorials</h2>
-
- <p>
- The <a href="../doxygen/tutorial/index.html"
- target="_top">tutorial</a> is for new users of the
- library. It explains the basic elements of finite element
- programs based on the library, and provides small example
- programs. You can also reach the tutorial link from the
- menu bar at the left. There is also an extensive set of
- Youtube-hosted video lectures that provide both the
- context of the mathematical and computational methods of
- deal.II as well as demonstrate parts of the
- tutorial. These video lectures are also reachable from
- the menu bar at the left.
- </p>
-
- <p>
- As all other documentation, the HTML pages
- of the tutorials can be generated locally on your computer and
- can then be read offline. Please follow the
- instructions in the
- <a href="../readme.html" target="body">ReadMe</a> on how to
- generate them locally.
- </p>
-
-
- <h2>Programming interface</h2>
-
- <p>
- The <a href="../doxygen/deal.II/index.html" target="_top">programming
- interface/manual</a> pages are what you will need most often as a
- reference of all classes, functions and variables in the library. They
- are extensively documented (presently more than 5000 pages if
- printed), and generated by <a href="http://www.doxygen.org/"
- target="_top">Doxygen</a>. There is also a quick link to these pages from
- the menu bar at the left.
- </p>
-
- <p>
- The documentation uses many of the features of Doxygen. In particular,
- the link takes you straight to a page that lists <i>modules</i>, a way
- to group classes with similar purposes. This may be what you are probably
- interested in when you are not yet familiar with the library. If you
- already know your way around and want to look up the signature of a
- particular member function, for example, you may go to the class view or
- choose any of the other ways in which Doxygen allows you to navigate
- through the documentation.
- </p>
-
- <p>
- Just as for the tutorials, the API docs need to be generated first,
- if you download <acronym>deal.II</acronym>. Please follow the
- instructions in the
- <a href="../readme.html" target="body">ReadMe</a> on how to do
- this.
- </p>
-
- <hr />
- <address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
- $Date$
- </address>
- <div class="right">
- <a href="http://validator.w3.org/check?uri=referer" target="_top">
- <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
- <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
- <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
- </div>
-
- </body>
+<body>
+
+<h1>Information for Users</h1>
+
+<p>
+<br />
+This page gathers some information on developing programs based on
+<acronym>deal.II</acronym>, as well as on how to configure and use
+<acronym>deal.II</acronym>. At present, we have the following resources
+available:
+</p>
+
+
+<h2>Documentation</h2>
+
+<ul>
+
+<li> <p>
+ <a href="cmake.html">deal.II CMake documentation</a>:
+ This page provides extensive information about configuration and
+ installation with the CMake build system.
+
+ <li> <p><a href="cmakelists.html" target="body">Using CMake and
+ <acronym>deal.II</acronym> in a user project</a>:
+ This page covers how to use CMake in your own project.
+ An overview of how to retrieve necessary information
+ from a <acronym>deal.II</acronym> installation as well as how to
+ write a <code>CMakeLists.txt</code> for a client project is given.
+ </p>
+
+<li> <p><a href="doxygen.html">Linking your online documentation
+ to the deal.II online manual</a>: After spending a lot of time
+ writing good documentation for your code and putting it online,
+ here we explain how to put links to the deal.II online manual into
+ your documentation, so that readers can click through.
+ </p>
+
+<li> <p><a href="https://code.google.com/p/dealii/issues/list" target="_top">Bugs</a>:
+ Though well tested, <acronym>deal.II</acronym> certainly has
+ bugs. If you want to report a bug (or enhancement request),
+ go to the <a href="https://code.google.com/p/dealii/issues/list"
+ target="_top">bug tracking system</a> and enter a new ticket
+ for your issue.
+ </p>
+
+</ul>
+
+
+<h2>Tutorials</h2>
+
+<p>
+ The <a href="../doxygen/tutorial/index.html"
+ target="_top">tutorial</a> is for new users of the
+ library. It explains the basic elements of finite element
+ programs based on the library, and provides small example
+ programs. You can also reach the tutorial link from the
+ menu bar at the left. There is also an extensive set of
+ Youtube-hosted video lectures that provide both the
+ context of the mathematical and computational methods of
+ deal.II as well as demonstrate parts of the
+ tutorial. These video lectures are also reachable from
+ the menu bar at the left.
+</p>
+
+<p>
+ As all other documentation, the HTML pages
+ of the tutorials can be generated locally on your computer and
+ can then be read offline. Please follow the
+ instructions in the
+ <a href="../readme.html" target="body">ReadMe</a> on how to
+ generate them locally.
+</p>
+
+
+<h2>Programming interface</h2>
+
+<p>
+The <a href="../doxygen/deal.II/index.html" target="_top">programming
+ interface/manual</a> pages are what you will need most often as a
+reference of all classes, functions and variables in the library. They
+are extensively documented (presently more than 5000 pages if
+printed), and generated by <a href="http://www.doxygen.org/"
+ target="_top">Doxygen</a>. There is also a quick link to these pages from
+the menu bar at the left.
+</p>
+
+<p>
+The documentation uses many of the features of Doxygen. In particular,
+the link takes you straight to a page that lists <i>modules</i>, a way
+to group classes with similar purposes. This may be what you are probably
+interested in when you are not yet familiar with the library. If you
+already know your way around and want to look up the signature of a
+particular member function, for example, you may go to the class view or
+choose any of the other ways in which Doxygen allows you to navigate
+through the documentation.
+</p>
+
+<p>
+Just as for the tutorials, the API docs need to be generated first,
+if you download <acronym>deal.II</acronym>. Please follow the
+instructions in the
+<a href="../readme.html" target="body">ReadMe</a> on how to do
+this.
+</p>
+
+<hr />
+<address>
+ <a href="../authors.html" target="body">The deal.II Authors</a>
+ $Date$
+</address>
+<div class="right">
+ <a href="http://validator.w3.org/check?uri=referer" target="_top">
+ <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
+ <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
+ <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
+</div>
+
+</body>
</html>