mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 05:20:34 +00:00
CTestCoverageCollectGCOV: Avoid capturing gcov output in QUIET mode
The `QUIET` mode suppresses any mention of our logged output, so do not bother logging it. This also provides a way for users to avoid saving possibly large output on disk. Fixes: #20554
This commit is contained in:
parent
43aaf2ac1e
commit
5b12fe4633
@ -137,12 +137,23 @@ function(ctest_coverage_collect_gcov)
|
||||
if(NOT DEFINED GCOV_GCOV_OPTIONS)
|
||||
set(GCOV_GCOV_OPTIONS -b -x)
|
||||
endif()
|
||||
execute_process(COMMAND
|
||||
${gcov_command} ${GCOV_GCOV_OPTIONS} ${gcda_files}
|
||||
if (GCOV_QUIET)
|
||||
set(coverage_out_opts
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET
|
||||
)
|
||||
else()
|
||||
set(coverage_out_opts
|
||||
OUTPUT_FILE "${coverage_dir}/gcov.log"
|
||||
ERROR_FILE "${coverage_dir}/gcov.log"
|
||||
)
|
||||
endif()
|
||||
execute_process(COMMAND
|
||||
${gcov_command} ${GCOV_GCOV_OPTIONS} ${gcda_files}
|
||||
RESULT_VARIABLE res
|
||||
WORKING_DIRECTORY ${coverage_dir})
|
||||
WORKING_DIRECTORY ${coverage_dir}
|
||||
${coverage_out_opts}
|
||||
)
|
||||
|
||||
if (GCOV_DELETE)
|
||||
file(REMOVE ${gcda_files})
|
||||
|
Loading…
Reference in New Issue
Block a user