Closed grencez closed 1 year ago
-DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"
ctest -T Test -T Coverage
lcov --capture --directory bld/Testing/CoverageInfo/ --output-file bld/coverage_report.info
bld/coverage_report.info
Refs:
https://github.com/codecov/example-cpp11-cmake
I've almost got it but might be confused about the lcov command. Maybe running it from the wrong directory.
-DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"
. Maybe a Debug build. Maybe RelWithDebInfo.ctest -T Test -T Coverage
.lcov --capture --directory bld/Testing/CoverageInfo/ --output-file bld/coverage_report.info
bld/coverage_report.info
.Refs: