diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 29e3483c71f..dc69af9acd1 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 43fa7d4812b..8b23e61635b 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) {