<p>
<p>
- If you want to <i>configure, build and install</i> only the debug
- or optimized variant of the <acronym>deal.II</acronym> library,
- have a look at the discussion of <code>CMAKE_BUILD_TYPE</code>
- found <a href="#tuningbuild">here</a>.
- <p>
- 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
<code>cmake</code> 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:
from anywhere within the build directory.
</p>
+ <p>
+ <b>Note:</b> Just because you can call <code>make deal_II.g</code> to
+ only compile the debug version does not mean that a
+ subsequent <code>make install</code> will only install the debug
+ library. Rather, <code>make install</code> will still want to have both
+ libraries up to date and will therefore invoke <code>make all</code>
+ automatically. To restrict builds in such a way that only one library
+ will be installed, see <a href="#tuningbuild">this section</a>.
+ </p>
+
<a name="tuning"></a>
<h3>Fine tuning the configuration system</h3>
<h4> Build configuration </h4>
<p>
+ As explained in <a href="#compiling">this section above</a>, one can
+ limit <code>make</code> 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 <code>make install</code> can install them. Rather,
+ the <code>cmake</code> variable
<code>CMAKE_BUILD_TYPE</code> controls the type of build.
We support the <code>Debug</code>, <code>Release</code>
and <code>DebugRelease</code> build targets. Default is the
<code>DebugRelease</code> target.
<ul>
<li>
- <code>Debug</code> will configure, build and install a debug
- library <code>libdeal_II.g.so</code>
+ Passing <code>cmake</code> the
+ flag <code>-DCMAKE_BUILD_TYPE=Debug</code> will produce makefiles
+ that require only compiling and installing the debug library
+ <code>libdeal_II.g.so</code>
<li>
- <code>Release</code> will do the same for an optimized library
- <code>libdeal_II.so</code>.
+ Passing <code>cmake</code> the
+ flag <code>-DCMAKE_BUILD_TYPE=Release</code> result in only
+ compiling and installing <code>libdeal_II.so</code>.
<li>
- <code>DebugRelease</code> will configure, build and install
- both libraries
+ Passing <code>cmake</code> the
+ flag <code>-DCMAKE_BUILD_TYPE=DebugRelease</code> will build and
+ install both libraries.
</ul>
- </p>
- <p>
- For more information, see the general discussion found
- <a href="../readme.html#configuration">here</a>.
+ For more information on what these targets represent, see the general
+ discussion <a href="../readme.html#configuration">here</a>.
</p>
<p>
For an advanced setup in a big CMake project
<code><a href="#extcmake">deal.IIConfig.cmake</a></code>
provides information about the <acronym>deal.II</acronym>
- installation with traditional variables, see
+ installation with traditional variables, see
<a href="#extcmake">here</a>, as well as <i>external CMake
targets</i> with link interface for direct inclusion:
<pre>