Additional CMake functionality. Most of the modules are from Ryan Pavlik (https://github.com/rpavlik/cmake-modules)
Boost Software License 1.0
548
stars
213
forks
source link
Issue with append_coverage_compiler_flags_to_target (but with solution) #70
Closed
MuellerSeb closed 1 year ago
Hi there and thanks for this amazing repo!
I was trying to cleanup my coverage workflow and tried to replace
append_coverage_compiler_flags
withappend_coverage_compiler_flags_to_target
.Two problems came across:
CodeCoverage.cmake
L717):with:
Since the white spaces were not recognized to split the flags everything was append to
-g
which resulted in:gcov
. So I could solve this by replacing:with:
Note, that
--coverage
is equivalent to-fprofile-arcs -ftest-coverage
(when compiling) and-lgcov
(when linking). linkMaybe it could be a good idea to replace:
with
And maybe we could also replace
-fprofile-arcs -ftest-coverage
with--coverage
.Cheers, Sebastian