ctest_coverage.rst 1.6 KB

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