From e97a30802382ae0784b0d5525d7dc76a0fe7b47c Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Thu, 28 Aug 2025 15:15:17 +0100 Subject: [PATCH] Remove extraneous // LCOV_EXCL_START, and fix CMake warning (#5744) * Remove extraneous // LCOV_EXCL_START * Fix "At least one COMMAND must be given" CMake warning --- cmake/CodeCoverage.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index d6323c5cc..1803fd8a1 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -95,6 +95,15 @@ # - replace both functions setup_target_for_coverage_gcovr_* with a single setup_target_for_coverage_gcovr # - add support for all gcovr output formats # +# 2024-04-03, Bronek Kozicki +# - add support for output formats: jacoco, clover, lcov +# +# 2025-05-12, Jingchen Wu +# - add -fprofile-update=atomic to ensure atomic profile generation +# +# 2025-08-28, Bronek Kozicki +# - fix "At least one COMMAND must be given" CMake warning from policy CMP0175 +# # USAGE: # # 1. Copy this file into your cmake modules path. @@ -419,7 +428,7 @@ function(setup_target_for_coverage_gcovr) # Show info where to find the report add_custom_command(TARGET ${Coverage_NAME} POST_BUILD - COMMAND ; + COMMAND echo COMMENT "Code coverage report saved in ${GCOVR_OUTPUT_FILE} formatted as ${Coverage_FORMAT}" ) endfunction() # setup_target_for_coverage_gcovr