aa97875342307b0591d0131fb74d31feea9a9bc1
[contrib/upm.git] / docs / building.md
1 Building UPM                         {#building}
2 ============
3
4 UPM uses cmake in order to make compilation relatively painless. Cmake runs
5 build out of tree so the recommended way is to clone from git and make a build/
6 directory.
7
8 UPM will attempt to build all directories inside src/ and they must contain
9 individual CMakeLists.txt files.
10
11 ~~~~~~~~~~~~~{.sh}
12 mkdir build
13 cd build
14 cmake ..
15 make
16 ~~~~~~~~~~~~~
17
18 Our cmake configure has a number of options, `cmake -i` will ask you all sorts
19 of interesting questions, you can disable swig modules, build documentation
20 etc...
21
22 Few recommended options:
23 Changing install path from /usr/local to /usr
24 -DCMAKE_INSTALL_PREFIX:PATH=/usr
25
26 Building debug build:
27 -DCMAKE_BUILD_TYPE=DEBUG
28
29 Using clang instead of gcc:
30  -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang
31