3 \page development_environment Development Environment
7 \section sec_devenv_intro Introduction
8 This page describes the requirements in order to build the library.
10 \section sec_devenv_requirements Requirements
11 Compiler supported (older/others may work, but not tested):
28 - VC++ 14.34 (_MSC_VER=1934, Visual Studio 2022)
30 Tools needed to build the library:
33 Tools needed to develop the library:
37 Tools needed to build the documentation:
40 - LaTeX (there are formulas!)
42 optional (used for development only):
43 - lcov / genhtml, c++filt
45 - clang-tools (analyzer)
48 optional (no core dependency):
49 - Boost.ASIO (used only for some examples)
50 - Qt 5 (used only for some examples)
56 There are no other dependencies despite the standard library (C++17) to build this library.
58 Other compilers may work, however untested.
60 \section sec_devenv_build Build
61 For normal, debug and release builds use the standard cmake CMAKE_BUILD_TYPE variable.
62 For example a debug build:
64 Full information developpers build:
68 cmake -DCMAKE_BUILD_TYPE=Coverage ..
70 make coverage doc cppcheck
77 cmake -DCMAKE_BUILD_TYPE=Debug ..
81 If you like to perform code coverage using the unit tests, do:
85 cmake -DCMAKE_BUILD_TYPE=Coverage ..
90 As packaging system, cpack is used. Do after build:
95 or for individual package types:
110 After proper building and execution:
111 - [Code Coverage](../coverage/index.html)
112 - [cppcheck](../cppcheck.txt)
113 - [Doxygen Warnings](../doxygen-warnings.txt)
116 \section sec_devenv_buildoptions Build Options
117 The following build types (-DCMAKE_BUILD_TYPE=x) are possible:
123 - `ENABLE_STATIC` : enables static build, if `OFF`, a shared library is being built.
125 - `ENABLE_PROFILING` : enables profiling for `gprof`
126 - `ENABLE_BENCHMARK` : enables benchmarking (disables some optimization)
127 - `ENABLE_SANITIZER` : enables address and undefined sanitizers
130 - `ENABLE_EXAMPLES`: enables examples. Default: `ON`
131 - `ENABLE_TOOLS`: enables tools. Default: `ON`
132 - `ENABLE_TESTS`: enables unit tests, integration tests and benchmarks. Default: `ON`
133 - `ENABLE_TESTS_BENCHMARK`: enables benchmark tests, enabled only if `ENABLE_TESTS` is also enabled. Default: `ON`
136 \section sec_devenv_clang_static_analysis Static Analysis with Clang
137 There is a script ```bin/static-analysis-clang``` for doing this, or do it manually:
141 cmake -DCMAKE_CXX_COMPILER=/usr/share/clang/scan-build-3.9/libexec/c++-analyzer ..
142 scan-build-3.9 -o doc/analysis --use-analyzer=/usr/bin/clang++-3.9 make
145 After the build, ```scan-build``` will tell you what to do in order to inspect
149 \section sec_devenv_benchmarks Perform Benchmarks
150 Build in ```Release``` mode, perform individual benchmarks:
154 cmake -DCMAKE_BUILD_TYPE=Release ..
156 test/benchmark_nmea_split
159 Using `perf` to do performance analysis:
163 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_BENCHMARK=ON ..
165 perf record -g test/benchmark_nmea_split
166 perf report -g 'graph,0.5,caller'