Skip to content

Commit 14dc2b3

Browse files
committed
CodeCoverage: Import upstream changes
1 parent 66febac commit 14dc2b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/Modules/CodeCoverage.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
# 2017-06-02, Lars Bilke
4242
# - Merged with modified version from github.com/ufz/ogs
4343
#
44+
# 2019-05-06, Anatolii Kurotych
45+
# - Remove unnecessary --coverage flag
4446
#
4547
# 2019-12-10, FeRD (Frank Dana)
4648
# - Set PROJECT_SOURCE_DIR as lcov basedir with -b argument
@@ -97,7 +99,7 @@ elseif(NOT CMAKE_COMPILER_IS_GNUCXX)
9799
message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
98100
endif()
99101

100-
set(COVERAGE_COMPILER_FLAGS "-g --coverage -fprofile-arcs -ftest-coverage"
102+
set(COVERAGE_COMPILER_FLAGS "-g -fprofile-arcs -ftest-coverage"
101103
CACHE INTERNAL "")
102104

103105
set(CMAKE_CXX_FLAGS_COVERAGE
@@ -128,8 +130,6 @@ endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
128130

129131
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
130132
link_libraries(gcov)
131-
else()
132-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
133133
endif()
134134

135135
# Defines a target for running and collection code coverage information

0 commit comments

Comments
 (0)