From 30cb628ecb31484015136bf6065c9c40f59a9297 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 28 Jan 2015 17:08:41 -0500 Subject: [PATCH] CTestCoverageCollectGCOV: Fix handling of large file counts Use the --files-from option to tar to handle lots of files. --- Modules/CTestCoverageCollectGCOV.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index f6616e0df..f8058cd2c 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -130,9 +130,16 @@ function(ctest_coverage_collect_gcov) # tar up the coverage info with the same date so that the md5 # sum will be the same for the tar file independent of file time # stamps + string(REPLACE ";" "\n" gcov_files "${gcov_files}") + string(REPLACE ";" "\n" label_files "${label_files}") + file(WRITE "${coverage_dir}/coverage_file_list.txt" + "${gcov_files} +${coverage_dir}/data.json +${label_files} +") execute_process(COMMAND ${CMAKE_COMMAND} -E tar cvfj ${GCOV_TARBALL} - "--mtime=1970-01-01 0:0:0 UTC" ${gcov_files} - ${coverage_dir}/data.json ${label_files} + "--mtime=1970-01-01 0:0:0 UTC" + --files-from=${coverage_dir}/coverage_file_list.txt WORKING_DIRECTORY ${binary_dir}) endfunction()