From e38eef345e0dd38253b212c9c6590f4c07188d86 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 1 Nov 2023 11:31:16 +0100 Subject: [PATCH] Replace the specific gcov compile and link options with generic --coverage Follow up commit fixing review comments. Amends 42d29441914da263a160d631f56c6d95f85eac70 Task-number: QTBUG-86223 Change-Id: Ia1353fd9855d6811e58ae8b706e932f01fdeec28 Reviewed-by: Alexandru Croitor --- cmake/QtInternalTargets.cmake | 4 ++-- configure.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 29e3483c71..dc69af9acd 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -369,8 +369,8 @@ endif() function(qt_internal_apply_coverage_flags) if(QT_FEATURE_coverage_gcov) target_compile_options(PlatformCommonInternal INTERFACE - "$<$:-fprofile-arcs;-ftest-coverage>") - target_link_options(PlatformCommonInternal INTERFACE "$<$:-lgcov;--coverage>") + "$<$:--coverage>") + target_link_options(PlatformCommonInternal INTERFACE "$<$:--coverage>") endif() endfunction() qt_internal_apply_coverage_flags() diff --git a/configure.cmake b/configure.cmake index 43fa7d4812..8b23e61635 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1053,7 +1053,7 @@ qt_feature("intelcet" PRIVATE if("${INPUT_coverage}" STREQUAL "gcov") qt_config_compile_test(gcov LABEL "gcov compiler flags" - COMPILE_OPTIONS "-fprofile-arcs -ftest-coverage" + COMPILE_OPTIONS "--coverage" CODE "int main(void) {