USE_CCACHE
Activates ccache (see Ccache)
Options: ON | OFF
WITH_SIMCORE
Build OSI based scenario simulation, also know as openPASS simulation core (opSimulation).
Options: OFF | ON
WITH_DOC
Build sphinx based documentation
Options: OFF | ON
WITH_API_DOC
Build sphinx based developer documentation
Options: OFF | ON
Automatically activates WITH_DOC
if ON
Warning
Building the API doc takes pretty long.
WITH_TESTS
Build unit tests
Options: OFF | ON
WITH_COVERAGE
Warning
This option turns off optimization, which might make execution considerably slower.
In exchange, a coverage <test_name>.info` and HTML reports will be generated in a folder called coverage
within the cmake build folder.
For each registered test target (see add_openpass_target
in ./cmake/HelperMacros.cmake
) two more targets are added.
One for code coverage analysis using lcov
(target <test_name>_coverage
).
A second for HTML report generation using genhtml
(target <test_name>_html
).
In addition to the individual tests, an overall test target TestCoverageReport
is created.
When invoked, it will execute all individual tests and combine their coverage data into a single report found in coverage/TestCoverageReport
.
Options: OFF | ON
Requires:
WITH_TESTS=ON
gcov, lcov, fastcov (python)
Parameterization:
COVERAGE_EXCLUDES
allows to remove source files from report (substring matching), i.e. /usr/include
.
Multiple paths have to be separated by spaces.
Paths specified through CMAKE_PREFIX_PATH
and tests/
are filtered by default.
Warning
Excluding too many paths or files may lead to an empty <test_name>.info
file, causing the HTML target to fail.
WITH_ENDTOEND_TESTS
Enables execution of end to end tests using EndToEnd Test Framework.
Tests can be ran by executing make install && make pyOpenPASS
Options: OFF | ON
OPENPASS_ADJUST_OUTPUT
Adjusts if builds are executed in the (CMake default) folder build
or directly in the specified install directory.
Latter let you skip the call make install
.
Options: OFF | ON
Warning
When skipping make install
, dependencies are not copied into the output folder, which could cause crashes due to missing or outdated libraries.
WITH_PROTOBUF_ARENA
Arena allocation is a C++-only feature that helps you optimize your memory usage and improve performance when working with protocol buffers.
Options: ON | OFF
This feature is only available, if protobuf related libraries are also compiled with arenas.
Fortunately, the implementation falls back to regular allocation if not, which simply results in less performance.
INSTALL_SYSTEM_RUNTIME_DEPS
during installation step, this configuration copies detected system runtime dependencies to install directory (i.e. MinGW system libraries)
Options: ON | OFF
Warning
Under windows, automatic resolution might fail if other MinGW instances are installed.
As several programs use MinGW under the hood, it is recommended to set the used MinGW path in the CMAKE_PREFIX_PATH explicitly:
CMAKE_PREFIX_PATH = mingw64/bin;\...
INSTALL_EXTRA_RUNTIME_DEPS
during installation step, this configuration copies detected runtime dependencies (i.e. required shared libraries) specified in CMAKE_PREFIX_PATH to install directory
Options: ON | OFF
INSTALL_EXAMPLES
If ON, opSimulation configuration examples are copied to the examples folder inside the installation directory (during the installation step).
Options: ON | OFF
Make Targets/Commands
openPASS defines build targets by major modules or components, such as opSimulation
or Algorithm_FmuWrapper
.
After calling CMake, simply build openPASS by calling make
.
See also
https://www.tutorialspoint.com/unix_commands/make.htm
Build and Install
make install
make <target>
: Build a single target
Executing Tests
All tests: make test ARGS="--output-on-failure -j3"
Single test: make test opSimulation_Tests ARGS="--output-on-failure -j3"