Target reference#
All LIBRA build targets. Targets are only defined for the top-level
CMake project() — dependent projects that also use LIBRA are
unaffected.
For a conceptual overview of how targets are organised and the availability model, see Targets. For common workflows using these targets, see Build lifecycle.
Note
All examples assume the Ninja or Unix Makefiles generator.
Adjust make → cmake --build . as needed.
Discovery#
Target |
Description |
|---|---|
|
Emit a table of all LIBRA targets, whether or not they are
enabled/available, and — more importantly — why. E.g., a
necessary program was not found, or a |
Test targets#
Requires LIBRA_TESTS to be enabled. No tests are
included in the default build — see Testing for the
rationale.
Target |
Description |
|---|---|
|
Build all unit tests. To build a single test: make hfsm-utest
for a file named |
|
Build all integration tests. To build a single test: make hfsm-itest
|
|
Build all regression tests. To build a single test: make hfsm-rtest
|
|
Build all unit, integration, and regression tests. Equivalent to
|
|
Build |
|
Run already-built tests via |
Analysis and formatting targets#
Requires LIBRA_ANALYSIS to be enabled. Only targets
for tools that are found on PATH are created — see
Targets for the availability model.
Target |
Description |
|---|---|
|
Run all enabled static checkers. Runs the following sub-targets individually:
Changed in version 0.8.5: Renamed from For tool-specific configuration, see Static analysis. |
|
Run all enabled formatters (changes files in place):
Added in version 0.8.15. |
|
Run all enabled auto-fixers:
|
Coverage targets#
Requires LIBRA_COVERAGE to be enabled.
Target |
Description |
|---|---|
|
Capture baseline coverage data (0%) for all files before running
tests. First step in generating an absolute report that shows
untested files. Requires GNU format
( |
|
Generate an absolute HTML coverage report using
lcov/genhtml. All source files are included; files with 0%
coverage are shown. Requires |
|
Generate a relative HTML coverage report using gcovr. Only files with >0% coverage are included. Requires GNU format. |
|
Check coverage against configured thresholds and fail if any threshold is not met. Thresholds are set via: Requires GNU format. |
|
Merge raw Warning Run test binaries from the build directory root to
ensure |
|
Print LLVM coverage summary to the terminal. Requires LLVM format. |
|
Print detailed per-file LLVM coverage to the terminal. Requires LLVM format. |
|
Generate an HTML LLVM coverage report. Requires LLVM format. |
|
Export LLVM coverage data to lcov format for further processing. Requires LLVM format. |
|
Run |
Documentation targets#
Requires LIBRA_DOCS to be enabled. For tool-specific
configuration, see Documentation.
Target |
Description |
|---|---|
|
Generate API documentation with Doxygen. |
|
Check API documentation. Sub-targets:
For tool-specific notes, see Documentation. |
|
Generate project documentation with Sphinx. Depends on
|
Packaging targets#
Target |
Description |
|---|---|
|
Build deployable packages using CPack. Requires
|