From: bangerth
- If you want to configure, build and install only the debug
- or optimized variant of the deal.II library,
- have a look at the discussion of
- While developing on the library itself it is often desirable
+ While developing the library itself it is often desirable
to only compile certain parts. The build system generated by
+ Note: Just because you can call
+ As explained in this section above, one can
+ limit CMAKE_BUILD_TYPE
- found here.
- cmake
allows to build specific, selected targets.
-
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:
@@ -191,6 +185,16 @@
from anywhere within the build directory.
make deal_II.g
to
+ only compile the debug version does not mean that a
+ subsequent make install
will only install the debug
+ library. Rather, make install
will still want to have both
+ libraries up to date and will therefore invoke make all
+ automatically. To restrict builds in such a way that only one library
+ will be installed, see this section.
+ Fine tuning the configuration system
@@ -472,25 +476,32 @@
Build configuration
make
to building only a subset of the usual
+ libraries. However, this does not restrict the set of things that need
+ to be built so that make install
can install them. Rather,
+ the cmake
variable
CMAKE_BUILD_TYPE
controls the type of build.
We support the Debug
, Release
and DebugRelease
build targets. Default is the
DebugRelease
target.
- Debug
will configure, build and install a debug
- library libdeal_II.g.so
+ Passing cmake
the
+ flag -DCMAKE_BUILD_TYPE=Debug
will produce makefiles
+ that require only compiling and installing the debug library
+ libdeal_II.g.so
Release
will do the same for an optimized library
- libdeal_II.so
.
+ Passing cmake
the
+ flag -DCMAKE_BUILD_TYPE=Release
result in only
+ compiling and installing libdeal_II.so
.
DebugRelease
will configure, build and install
- both libraries
+ Passing cmake
the
+ flag -DCMAKE_BUILD_TYPE=DebugRelease
will build and
+ install both libraries.
- For more information, see the general discussion found - here. + For more information on what these targets represent, see the general + discussion here.
@@ -815,7 +826,7 @@
For an advanced setup in a big CMake project
deal.IIConfig.cmake
provides information about the deal.II
- installation with traditional variables, see
+ installation with traditional variables, see
here, as well as external CMake
targets with link interface for direct inclusion: