• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1ctest_coverage
2--------------
3
4Perform the :ref:`CTest Coverage Step` as a :ref:`Dashboard Client`.
5
6::
7
8  ctest_coverage([BUILD <build-dir>] [APPEND]
9                 [LABELS <label>...]
10                 [RETURN_VALUE <result-var>]
11                 [CAPTURE_CMAKE_ERROR <result-var>]
12                 [QUIET]
13                 )
14
15Collect coverage tool results and stores them in ``Coverage.xml``
16for submission with the :command:`ctest_submit` command.
17
18The options are:
19
20``BUILD <build-dir>``
21  Specify the top-level build directory.  If not given, the
22  :variable:`CTEST_BINARY_DIRECTORY` variable is used.
23
24``APPEND``
25  Mark ``Coverage.xml`` for append to results previously submitted to a
26  dashboard server since the last :command:`ctest_start` call.
27  Append semantics are defined by the dashboard server in use.
28  This does *not* cause results to be appended to a ``.xml`` file
29  produced by a previous call to this command.
30
31``LABELS``
32  Filter the coverage report to include only source files labeled
33  with at least one of the labels specified.
34
35``RETURN_VALUE <result-var>``
36  Store in the ``<result-var>`` variable ``0`` if coverage tools
37  ran without error and non-zero otherwise.
38
39``CAPTURE_CMAKE_ERROR <result-var>``
40  .. versionadded:: 3.7
41
42  Store in the ``<result-var>`` variable -1 if there are any errors running
43  the command and prevent ctest from returning non-zero if an error occurs.
44
45``QUIET``
46  .. versionadded:: 3.3
47
48  Suppress any CTest-specific non-error output that would have been
49  printed to the console otherwise.  The summary indicating how many
50  lines of code were covered is unaffected by this option.
51