HOWTO_cmake.html 2 KB
Newer Older
1
2
3
4
5
6
7
8
<html>
<head>
<title> Using AMDiS with cmake </title>
</head>
<body>
<h1> Using AMDiS with cmake </h1>
With this short page, I will show you, how to use the cmake buildsystem with AMDiS. The introduction consists of two main parts:
<ol> <li>compiling and installing AMDiS with CMake </li>
Naumann, Andreas's avatar
Naumann, Andreas committed
9
<li> using the cmake installed AMDiS in your project </li></ol>
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

<h2> Compiling and installing AMDiS with CMake </h2>
<h3> configure </h3>
There are 3 different configure tools for CMake:
<ul> <li> cmake (non interactive) </li>
<li> ccmake (interactive on command line) </li>
<li> cmake-gui (qt-based gui) </li></ul>

<p>I will use the cmake and ccmake. The autoconf/automake implementation was used directly inside the AMDiS source directory (i.e. the directory you get through svn). To use the CMake buildsystem, I recommend a different directory structure for building and compiling AMDiS. The script <a href="https://gforge.zih.tu-dresden.de/frs/download.php/34/getamdis_cmake.sh" >getamdis_cmake.sh</a>, which can be found on <ah ref="https://gforge.zih.tu-dresden.de" >gforge.zih.tu-dresden.de</a>, creates such a directory structure.</p>
Assume, you have AMDiS downloaded in the directory
<p align="center">
 /home/joe/work/
 </p>
, the AMDiS source directory is
<p align="center">
 /home/joe/work/amdis/AMDiS
 </p>
. To configure and compile AMDiS I recommend to create a directory 
<p align="center">
 /home/joe/work/amdis_build
 </p>
and run
<p align="center">
 cd /home/joe/work/amdis_build<br>
 cmake -DCMAKE_INSTALL_PREFIX=/home/joe/programs/ ../amdis/AMDiS
 </p>

Compilation and installation is the same as with automake/autoconf:
<p align="center">
 make ; make install
 </p>
The last command will install AMDiS to /home/joe/programs

<a href="#config_fast_and_simple" >fast and simple configuration </a>
<a href="#config_with_options" >configuration with options </a>
If you only want to build with standard options, you can simply run
   <verbatim> cmake . </verbatim>
Naumann, Andreas's avatar
Naumann, Andreas committed
47
<h2> Using the cmake installed AMDiS in your project </h2>
48
49
</body>
</html>