From 99aa902959352adbcb9fb1b87ff613e37c0170fe Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 1 Apr 2015 18:41:05 +0200 Subject: [PATCH] Documentation: Update CMake part to reflect the latest changes --- doc/users/cmakelists.html | 111 ++++++++++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 29 deletions(-) diff --git a/doc/users/cmakelists.html b/doc/users/cmakelists.html index 782e6d3d14..a3e204cdb1 100644 --- a/doc/users/cmakelists.html +++ b/doc/users/cmakelists.html @@ -66,7 +66,7 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 
-FIND_PACKAGE(deal.II 8.0 REQUIRED
+FIND_PACKAGE(deal.II 8.3 REQUIRED
   HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
   )
 DEAL_II_INITIALIZE_CACHED_VARIABLES()
@@ -87,16 +87,15 @@ DEAL_II_SETUP_TARGET(mycode)
 

Next, we find our deal.II installation with the help of the FIND_PACKAGE command. In this case requiring at least - version 8.0, which is the first version using CMake. The - HINTS are a list of directories where the install directory - of deal.II is likely to be found. First, the location possibly defined in - the CMake variable DEAL_II_DIR is considered. After that, we - check whether we are in a subdirectory (first and second level) of the - deal.II installation and otherwise use the environment variable - DEAL_II_DIR. If all of these hints fail the default system - locations /usr/ and /usr/local/ are considered. - The list after HINTS can be changed according to your - preferences. + version 8.3. The HINTS are a list of directories where the + install directory of deal.II is likely to be found. First, the location + possibly defined in the CMake variable DEAL_II_DIR is + considered. After that, we check whether we are in a subdirectory (first + and second level) of the deal.II installation and otherwise use the + environment variable DEAL_II_DIR. If all of these hints fail + the default system locations /usr/ and + /usr/local/ are considered. The list after + HINTS can be changed according to your preferences.

@@ -114,8 +113,9 @@ DEAL_II_SETUP_TARGET(mycode)

Finally, the last two lines define the executable that is to be produced and its source code. The - DEAL_II_SETUP_TARGET macro will set up necessary - include directories, compile definitions and the link interface. + DEAL_II_SETUP_TARGET macro will set up necessary include + directories, compile flags, compile definitions, link flags and the link + interface.

@@ -445,19 +445,52 @@ source file you have to touch a CMakeLists.txt file or to run

DEAL_II_SETUP_TARGET revisited

-The DEAL_II_SETUP_TARGET macro is responsible for setting up a -target to compile and link against deal.II. It will append the -INCLUDE_DIRECTORIES property with the location of the deal.II -include directories, and the compile definitions and linker flags property -COMPILE_DEFINITIONS and LINK_FLAGS by their -respective values (depending on build type and available debug and/or -optimized flavor of the library). + The DEAL_II_SETUP_TARGET macro is responsible for setting up + a target to compile and link against deal.II. It will append the + INCLUDE_DIRECTORIES property with the location of the + deal.II include directories, and append the properties + COMPILE_FLAGS, COMPILE_DEFINITIONS and + LINK_FLAGS by their respective values from the deal.II + configuration (depending on build type and available debug and/or + optimized flavor of the library). +

+

+ Except in the case of an object library, the specified target will also + be set up to link against deal.II (and its transitive link interface) as + well.

+

-Except in the case of an object library, the specified target will be set -up to link against deal.II (and its transitive link interface) as well. + Optionally, the DEAL_II_SETUP_TARGET macro takes an + additional argument DEBUG, or RELEASE, after + the target name to explicitly state the library flavor the target should + be set up for. If the parameter is omitted, the correct choice is deduced + from the current build type (with DEBUG taking precedence in + case of DebugRelease as build type).

+

+ Note: The flags that are added with DEAL_II_SETUP_TARGET to + the target come last in the final link compiler invocation, or linker + invocation. This means they take precedence over all flags defined via + globally via CMAKE_CXX_FLAGS, etc., or as a directory + property. If you wish to modify flags or preprocessor definitions set up + with DEAL_II_SETUP_TARGET modify on of the following + variables (see the section about deal.IIConfig.cmake for + details): +

+DEAL_II_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
+DEAL_II_USER_DEFINITIONS
+DEAL_II_USER_DEFINITIONS_DEBUG
+DEAL_II_USER_DEFINITIONS_RELEASE
+
+

DEAL_II_INITIALIZE_CACHED_VARIABLES revisited

@@ -477,15 +510,24 @@ The macro will set an uninitialized CMAKE_BUILD_TYPE variable to Debug (or Release if the debug library is not available). If CMAKE_BUILD_TYPE is specified it will automatically be reset if the given value is unsupported by the deal.II -installation. +installation (i.e., if it is not equal to Debug, +Release, or DebugRelease).

-Furthermore, this macro sets the C++ compiler and the compile flags to -default values (the same values that were used to compile deal.II itself). -These are CMAKE_CXX_COMPILER and DEAL_II_CXX_FLAGS, -as well as - depending on the configuration - -DEAL_II_CXX_FLAGS_DEBUG, or DEAL_II_CXX_FLAGS_RELEASE, or -both. +Furthermore, this macro sets the C++ compiler to the one used for compiling +the deal.II library. The variables will CMAKE_CXX_FLAGS, +CMAKE_CXX_FLAGS_DEBUG, and +CMAKE_CXX_FLAGS_RELEASE will be initialized with the empty +string. +

+ +

+Note: If you wish to override the flags and definitions set by the +DEAL_II_SETUP_TARGET macro you have to override the +corresponding DEAL_II_* variable instead. See the +documentation of DEAL_II_SETUP_TARGET +for further details.

@@ -761,6 +803,17 @@ DEAL_II_USER_DEFINITIONS - compile definitions for all configurations DEAL_II_USER_DEFINITIONS_DEBUG - _additional_ compile definitions for debug configuration DEAL_II_USER_DEFINITIONS_RELEASE - _additional_ compile definitions for release configuration +# +# Information about MPI runtime for the mpi implementation used in the +# deal.II library +# + +DEAL_II_MPIEXEC +DEAL_II_MPIEXEC_NUMPROC_FLAG +DEAL_II_MPIEXEC_PREFLAGS +DEAL_II_MPIEXEC_POSTFLAGS + + DEAL_II_STATIC_EXECUTABLE - true if the link interface is set up to compile resulting executables statically -- 2.39.5