1 Building libmraa {#building}
4 libmraa 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/ directory.
7 You'll need swig version 3.0.1+, currently I'm using
8 8d226e39dc7a958013ff9ffd15e231ef206ba265 from the swig master branch. This is
9 only required for javascript support and can be disabled with a cmake define
19 Our cmake configure has a number of options, cmake-gui or ccmake can show you
20 all the options. The interesting ones are detailed below:
22 Few recommended options:
23 Changing install path from /usr/local to /usr
24 -DCMAKE_INSTALL_PREFIX:PATH=/usr
27 -DCMAKE_BUILD_TYPE=DEBUG
29 Using clang instead of gcc:
30 -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang
32 Building with an older version of swig (swig 2.0+) requires the disabling of javascript:
35 Disabling python module building
38 Building doc, this will require sphinx & doxygen
44 Static analysis is routinely performed using coverity on libmraa's codebase.
45 This is the procedure to submit a build to coverity. You'll need to install
46 coverity-submit for your OS.
49 mkdir covbuild/ && cd covbuild
50 cmake -DBUILDDOC=OFF -DBUILDSWIG=OFF ..
51 cmake -DBUILDDOC=OFF -DBUILDSWIG=OFF ..
52 cov-build --dir cov-int make
53 tar caf mraa.tar..bz2 cov-int