diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2016-04-19 17:19:10 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2016-04-19 17:19:10 (GMT) |
commit | 5de122dfa4a1f60dae736d9f29e588cfd5ce0416 (patch) | |
tree | eaa9c073bc294417f97d3fb7a903ffcbc6b0b099 /Modules/CTestCoverageCollectGCOV.cmake | |
parent | 7d4c99a957b37e6905af3fe6ea96b7fdf2b8359c (diff) | |
download | CMake-5de122dfa4a1f60dae736d9f29e588cfd5ce0416.zip CMake-5de122dfa4a1f60dae736d9f29e588cfd5ce0416.tar.gz CMake-5de122dfa4a1f60dae736d9f29e588cfd5ce0416.tar.bz2 |
CTestCoverageCollectGCOV: improve DELETE option
The DELETE option to ctest_coverage_collect_gcov now properly
removes all the .gcov files that were created by this function.
Previously it left behind any files that were excluded by
CTEST_CUSTOM_COVERAGE_EXCLUDE.
This option now also deletes the following files/directory that
are created by ctest_coverage_collect_gcov:
data.json
coverage_file_list.txt
the uncovered/ directory
Diffstat (limited to 'Modules/CTestCoverageCollectGCOV.cmake')
-rw-r--r-- | Modules/CTestCoverageCollectGCOV.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index 31c4fef..a04d340 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -287,10 +287,14 @@ ${uncovered_files_for_tar} WORKING_DIRECTORY ${binary_dir}) if (GCOV_DELETE) - string(REPLACE "\n" ";" gcov_files "${gcov_files}") - foreach(gcov_file ${gcov_files}) + foreach(gcov_file ${unfiltered_gcov_files}) file(REMOVE ${binary_dir}/${gcov_file}) endforeach() + file(REMOVE ${coverage_dir}/coverage_file_list.txt) + file(REMOVE ${coverage_dir}/data.json) + if (EXISTS ${binary_dir}/uncovered) + file(REMOVE ${binary_dir}/uncovered) + endif() endif() endfunction() |