Merge topic 'patch-CTestCoverageCollectGCOV'
a76b533562
CTestCoverageCollectGCOV: Update documentation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10433
This commit is contained in:
commit
aab6f9f3f4
@ -7,10 +7,10 @@ CTestCoverageCollectGCOV
|
|||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
||||||
This module provides the ``ctest_coverage_collect_gcov`` function.
|
This module provides the ``ctest_coverage_collect_gcov()`` function.
|
||||||
|
|
||||||
This function runs gcov on all .gcda files found in the binary tree
|
This function runs ``gcov`` on all ``.gcda`` files found in the binary tree
|
||||||
and packages the resulting .gcov files into a tar file.
|
and packages the resulting ``.gcov`` files into a tar file.
|
||||||
This tarball also contains the following:
|
This tarball also contains the following:
|
||||||
|
|
||||||
* *data.json* defines the source and build directories for use by CDash.
|
* *data.json* defines the source and build directories for use by CDash.
|
||||||
@ -26,13 +26,19 @@ After generating this tar file, it can be sent to CDash for display with the
|
|||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
ctest_coverage_collect_gcov(TARBALL <tarfile>
|
ctest_coverage_collect_gcov(
|
||||||
[SOURCE <source_dir>][BUILD <build_dir>]
|
TARBALL <tarfile>
|
||||||
|
[TARBALL_COMPRESSION <option>]
|
||||||
|
[SOURCE <source_dir>]
|
||||||
|
[BUILD <build_dir>]
|
||||||
[GCOV_COMMAND <gcov_command>]
|
[GCOV_COMMAND <gcov_command>]
|
||||||
[GCOV_OPTIONS <options>...]
|
[GCOV_OPTIONS <options>...]
|
||||||
)
|
[GLOB]
|
||||||
|
[DELETE]
|
||||||
|
[QUIET]
|
||||||
|
)
|
||||||
|
|
||||||
Run gcov and package a tar file for CDash. The options are:
|
Run ``gcov`` and package a tar file for CDash. The options are:
|
||||||
|
|
||||||
``TARBALL <tarfile>``
|
``TARBALL <tarfile>``
|
||||||
Specify the location of the ``.tar`` file to be created for later
|
Specify the location of the ``.tar`` file to be created for later
|
||||||
@ -73,8 +79,9 @@ After generating this tar file, it can be sent to CDash for display with the
|
|||||||
``GLOB``
|
``GLOB``
|
||||||
.. versionadded:: 3.6
|
.. versionadded:: 3.6
|
||||||
|
|
||||||
Recursively search for .gcda files in build_dir rather than
|
Recursively search for ``.gcda`` files in ``<build_dir>`` rather than
|
||||||
determining search locations by reading TargetDirectories.txt.
|
determining search locations by reading ``CMakeFiles/TargetDirectories.txt``
|
||||||
|
(file generated by CMake at the generation phase).
|
||||||
|
|
||||||
``DELETE``
|
``DELETE``
|
||||||
.. versionadded:: 3.6
|
.. versionadded:: 3.6
|
||||||
@ -88,6 +95,20 @@ After generating this tar file, it can be sent to CDash for display with the
|
|||||||
.. versionadded:: 3.3
|
.. versionadded:: 3.3
|
||||||
Added support for the :variable:`CTEST_CUSTOM_COVERAGE_EXCLUDE` variable.
|
Added support for the :variable:`CTEST_CUSTOM_COVERAGE_EXCLUDE` variable.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
Generating code coverage data packaged as a ``.tar.gz`` file in a
|
||||||
|
:option:`ctest -S` script:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
include(CTestCoverageCollectGCOV)
|
||||||
|
|
||||||
|
ctest_coverage_collect_gcov(
|
||||||
|
TARBALL "${CTEST_BINARY_DIRECTORY}/gcov.tar.gz"
|
||||||
|
TARBALL_COMPRESSION "GZIP"
|
||||||
|
)
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
|
||||||
function(ctest_coverage_collect_gcov)
|
function(ctest_coverage_collect_gcov)
|
||||||
|
Loading…
Reference in New Issue
Block a user