aboutsummaryrefslogtreecommitdiff
path: root/doc/Development/Configuring.asciidoc
blob: f436da5f10054cc5eb4378bae4e57f1fcd71891e (plain)
1
2
3
4
5
6
7
8
9
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
=== CMake

==== Compiler flags
-pipe -fstack-protector-strong -fno-plt -fPIE
-march=native -mtune=native

==== Install paths
CMAKE_INSTALL_PREFIX is prepended onto all install paths. This variable defaults
to /usr/local on *nix and c:/Program Files/${PROJECT_NAME} on Windows.

On *nix you can use DESTDIR to relocate the entire installation. DESTDIR is
prepended to CMAKE_INSTALL_PREFIX.

This will install the project to /ports/pkg/install/usr:

[source, sh]
----
cmake -DCMAKE_INSTALL_PREFIX=/usr ...
...
make DESTDIR=/ports/pkg/install install
----

==== clang-tidy
CMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=*"

==== cppcheck
CMAKE_CXX_CPPCHECK="cppcheck"

==== ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

==== llvm libcpp
CMAKE_CXX_FLAGS: -stdlib=libc++"
CMAKE_EXE_LINKER_FLAGS -stdlib=libc++