Skip to content

Commit 0123e29

Browse files
committed
Removal of ccov-run files from GCC-based coverage
The ccov-clean-TARGET targets now remove the .ccov-run files to ensure the executables are run again when associated coverage data is requested.
1 parent eda68ce commit 0123e29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

code-coverage.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,13 @@ function(target_code_coverage TARGET_NAME)
457457
add_custom_target(
458458
ccov-clean-${target_code_coverage_COVERAGE_TARGET_NAME}
459459
COMMAND ${CMAKE_COMMAND} -E remove -f ${COVERAGE_INFO}
460+
${target_code_coverage_COVERAGE_TARGET_NAME}.ccov-run
460461
COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters)
461462
else()
462463
add_custom_target(
463464
ccov-clean-${target_code_coverage_COVERAGE_TARGET_NAME}
464465
COMMAND ${CMAKE_COMMAND} -E rm -f ${COVERAGE_INFO}
466+
${target_code_coverage_COVERAGE_TARGET_NAME}.ccov-run
465467
COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters)
466468
endif()
467469
add_dependencies(ccov-clean

0 commit comments

Comments
 (0)