Coverage support is deprecated and will be removed in a future version of the oneAPI Construction Kit.
To access the commands and variables in this module:
The XML input file path to pass to the coverage script.
Compilation flags for coverage checking.
Linking flags for coverage checking.
List of source file directories to include in coverage, populated by function
List of test suite CMake targets to generate coverage information for, populated by
Path to the entry point of the code coverage checker Python script.
Flags to pass to the code coverage script, following format ‘
[FLAG-NAME] [SPACE] [FLAG-VALUE]’.
This function adds ‘
source directory, object directory’ pairs to the list of modules to target. It is invoked by the
CMakeLists.txtfiles of individual ComputeAorta modules which have this information available.
Function adding a test suite and flags to the list of test suites to be run by the script.
test_suite- Target name of test suite, appended to
- Keyword Arguments:
COMMAND- Command to execute test suite.
ENVIRONMENT- Environment variables of the form “VAR=<value>”.
Creates a CMake target
coverage_inputfor generating the XML input file to gathering coverage information on test suite targets in
CA_ENABLE_COVERAGEvariable is set, this function uses CMake add_custom_target to add the following commands:
Copies the generated files
coreSelect.hfrom the build directory to source directory so they can be included in coverage metrics.
coreSelect.hfrom the source directory.
coreSelect.hfrom the build directory to source directory. Runs the coverage script
COVERAGE_SCRIPT_PATH, then deletes the copied
coreSelect.hfiles from the source directory.
To start code coverage analysis a user should run the
$ ninja coverage
The root oneAPI Construction Kit
ca_option() to create the variable
CA_ENABLE_COVERAGE. When set the functions
add_coverage_custom_xml() will be invoked by our CMake.
CoverageXMLInput.cmake is used as part of the implementation of
add_coverage_xml_input from the Coverage Module.
A CMake script for generating an XML file to be used to calculate coverage
information. Script should be invoked using
-P as part of an internal
CMAKE_COMMAND. The following CMake input variables are
required to be set by Coverage Module:
Output variable containing generated XML.