<tr><th colspan="2"><b><small>Table of contents</small></b></th></tr>
<tr><td valign="top">
<ul>
- <li><a href="#operatingconf">Operating the configuration
- system</a>
- <li><a href="#compiling">Compiling only certain
- parts</a>
+ <li><a href="#operatingconf">Operating cmake</a>
<li><a href="#configure">Configuration options</a>
<ul>
<li><a href="#configurefeature">Feature configuration</a>
<li><a href="#extsetup">Setting up necessary configuration variables</a>
</ul>
<li><a href="#advanced">Initial cache file and advanced options</a>
+ <li><a href="#compiling">Compiling only certain parts</a>
</ul>
</td>
</tr>
</p>
<a name="operatingconf"></a>
- <h3>Operating the configuration system</h3>
+ <h3>Operating cmake</h3>
<p>
When configuring <acronym>deal.II</acronym> by
</p>
<p>
- Normally, after running <code>cmake</code> one will simply build
- the library by calling <code>make</code>. If the library changes,
- a subsequent call to <code>make</code> will only re-compile those
- files that depend on sources that have changed. In other words,
- one will rarely have to deal with the cached variables at all.
- </p>
-
- <p>
- That said, it is occasionally helpful to run <code>cmake</code>
- again, either because one would like to change the configuration
- parameters or because some configuration file (e.g., one of
- the <code>CMakeLists.txt</code> files) has changed. (In fact,
- if the latter happens to be the case, then just
- calling <code>make</code> calls back and runs <code>cmake</code>
- again automatically.) Either way, if that happens,
- then <code>cmake</code> will only run whatever tests are really
+ On a subsequent call to <code>cmake</code>, e.g. to change the
+ configuration or due to a callback from the build system because some
+ configuration file (the <code>CMakeLists.txt</code> and
+ <code>cmake/<..>.cmake</code> files) has changed,
+ <code>cmake</code> will only run whatever tests are
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
cmake -DCMAKE_INSTALL_PREFIX=/path/install/dir ../deal.II
cmake ../deal.II
</pre>
- has absolutely no effect: In particular, the second time around
- it uses the <code>CMAKE_INSTALL_PREFIX</code> value previously
- passed, along with all other arguments one may have had on the
- first invocation. This is different from the way
- the <code>autoconf/configure</code> mechanism worked.
+ has no effect: In particular, the second time around it
+ uses the <code>CMAKE_INSTALL_PREFIX</code> value previously
+ passed, along with all other arguments one may have had on
+ the first invocation. This is different from the way the
+ <code>autoconf/configure</code> mechanism worked.
</p>
<p>
mkdir build
cd build
cmake ../deal.II
- cmake -DDEAL_II_WITH_METIS=OFF ../
+ 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> but that we really didn't want to link with.
- </p>
-
-
- <a name="compiling"></a>
- <h3> Compiling only certain parts </h3>
- <p>
-
- <p>
- 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:
- <pre>
-
- make deal_II.g # only debug library
- make deal_II # only release (optimized) library
- make all # both
- </pre>
- </p>
-
- <p>
- For a complete list of possible targets that allow even
- finer-grained control, do
- <pre>
-
- 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>
- 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
- a <code>cd</code> command to change the current directory
- appropriately so that the command line can be copied and executed
- 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="#configurebuild">this section</a>.
+ <code>cmake</code> and enables support for Trilinos by enablind
+ <code>DEAL_II_WITH_TRILINOS</code> and setting
+ <code>TRILINOS_DIR</code>.
</p>
documentation as well as some advanced aspects in feature
configuration.
+
+ <a name="compiling"></a>
+ <h3> Compiling only certain parts </h3>
+ <p>
+
+ <p>
+ 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:
+ <pre>
+
+ 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>
+ </p>
+
+ <p>
+ For a complete list of possible targets that allow even
+ finer-grained control, do
+ <pre>
+
+ 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>
+ 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
+ a <code>cd</code> command to change the current directory
+ appropriately so that the command line can be copied and executed
+ 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="#configurebuild">this section</a>.
+ </p>
+
+
<hr>
<address>