Skip to content

Commit 547b11d

Browse files
committed
docu: some notes on how to build using CMake
1 parent feeb48e commit 547b11d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

doc/source/installing.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Building and Installing
2+
3+
## Prerequesites
4+
5+
* a recent C++ compiler, which supports most of the C++11 features
6+
* the [CMake](http://cmake.org/) build tool
7+
8+
9+
## Obtaining the Sources
10+
11+
Just use _Git_ to clone the repository.
12+
13+
14+
## Building
15+
16+
1. create a directory for out-of-source builds (usually, people are creative and name it `build`) in the source tree
17+
2. decide on what you want to build
18+
19+
By default everythin gets build, i.e. tests and examples.
20+
21+
To deactive the tests pass `-Dpfasst_BUILD_TESTS=OFF` to the _CMake_ command line.
22+
23+
To deactive the examples, pass `-Dpfasst_BUILD_EXAMPLES=OFF` to the _CMake_ command line.
24+
25+
If you are not on a _Darvin_ system (i.e. MacOS, OSX, ...) and you are using _Clang_ as the
26+
compiler, you want to deactive the use of LLVM's libc++ by passing `-Dpfasst_DISABLE_LIBCXX=ON`
27+
to the _CMake_ command line.
28+
29+
In the end, for a build with _Clang_ on a Linux system without the examples, the call to _CMake_
30+
looks like:
31+
32+
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Dpfasst_DISABLE_LIBCXX=ON -Dpfasst_BUILD_EXAMPLES=OFF ..
33+
34+
As the [Google Testing] and [Mocking Framework] are required for the unit tests, those are automatically
35+
downloaded and build.
36+
37+
In case, you enable the examples, [FFTW3] gets downloaded and build as well.
38+
3. run the unit tests (if unit tests have been built)
39+
40+
make test
41+
4. run the examples (if those have been built). e.g.:
42+
43+
./examples/advection
44+
45+
[Google Testing]: https://code.google.com/p/googletest/
46+
[Mocking Framework]: https://code.google.com/p/googlemock/
47+
[FFTW3]: http://fftw.org/

0 commit comments

Comments
 (0)