ctest_coverage.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 results for append to those 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. ``LABELS``
  22. Filter the coverage report to include only source files labeled
  23. with at least one of the labels specified.
  24. ``RETURN_VALUE <result-var>``
  25. Store in the ``<result-var>`` variable ``0`` if coverage tools
  26. ran without error and non-zero otherwise.
  27. ``CAPTURE_CMAKE_ERROR <result-var>``
  28. Store in the ``<result-var>`` variable -1 if there are any errors running
  29. the command and prevent ctest from returning non-zero if an error occurs.
  30. ``QUIET``
  31. Suppress any CTest-specific non-error output that would have been
  32. printed to the console otherwise. The summary indicating how many
  33. lines of code were covered is unaffected by this option.