diff options
author | Brad King <brad.king@kitware.com> | 2020-04-08 11:55:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-08 17:52:37 (GMT) |
commit | 43aaf2ac1eb5509b1ac408df0becda5da492fda1 (patch) | |
tree | eb1f8e2142f9553e650e17f9fef394a7289ea77a /Modules/CTestCoverageCollectGCOV.cmake | |
parent | 09d28262bf3cadaf3e556d7554c28379dc6d7216 (diff) | |
download | CMake-43aaf2ac1eb5509b1ac408df0becda5da492fda1.zip CMake-43aaf2ac1eb5509b1ac408df0becda5da492fda1.tar.gz CMake-43aaf2ac1eb5509b1ac408df0becda5da492fda1.tar.bz2 |
CTestCoverageCollectGCOV: Capture gcov output in log file
The output of gcov can be large and we only display it in a failure
case. Put it in a log file to avoid accumulating large output in
memory.
Issue: #20554
Diffstat (limited to 'Modules/CTestCoverageCollectGCOV.cmake')
-rw-r--r-- | Modules/CTestCoverageCollectGCOV.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index ff48cc2..43540da 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -139,7 +139,8 @@ function(ctest_coverage_collect_gcov) endif() execute_process(COMMAND ${gcov_command} ${GCOV_GCOV_OPTIONS} ${gcda_files} - OUTPUT_VARIABLE out + OUTPUT_FILE "${coverage_dir}/gcov.log" + ERROR_FILE "${coverage_dir}/gcov.log" RESULT_VARIABLE res WORKING_DIRECTORY ${coverage_dir}) @@ -149,7 +150,7 @@ function(ctest_coverage_collect_gcov) if(NOT "${res}" EQUAL 0) if (NOT GCOV_QUIET) - message(STATUS "Error running gcov: ${res} ${out}") + message(STATUS "Error running gcov: ${res}, see\n ${coverage_dir}/gcov.log") endif() endif() # create json file with project information |