Replace the specific gcov compile and link options with generic --coverage

Follow up commit fixing review comments.

Amends 42d2944191

Task-number: QTBUG-86223
Change-Id: Ia1353fd9855d6811e58ae8b706e932f01fdeec28
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2023-11-01 11:31:16 +01:00
parent 8842391e5c
commit e38eef345e
2 changed files with 3 additions and 3 deletions

View File

@ -369,8 +369,8 @@ endif()
function(qt_internal_apply_coverage_flags)
if(QT_FEATURE_coverage_gcov)
target_compile_options(PlatformCommonInternal INTERFACE
"$<$<CONFIG:Debug>:-fprofile-arcs;-ftest-coverage>")
target_link_options(PlatformCommonInternal INTERFACE "$<$<CONFIG:Debug>:-lgcov;--coverage>")
"$<$<CONFIG:Debug>:--coverage>")
target_link_options(PlatformCommonInternal INTERFACE "$<$<CONFIG:Debug>:--coverage>")
endif()
endfunction()
qt_internal_apply_coverage_flags()

View File

@ -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)
{