Closed PeterBowman closed 3 years ago
Yes. That looks cleaner, clearer, and much more efficient.
BTW:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
This also sets linker flags, while the following doesn't (and makes lcov/gcov crash with undefined reference errors, see this Travis job):
add_compile_options(-fprofile-arcs -ftest-coverage)
Perhaps not worth the trouble if we switch to Codecov at some point: https://github.com/roboticslab-uc3m/questions-and-answers/issues/71.
Not too sure, form a quick glance, Codecov looks different but not automatic: https://github.com/codecov/example-cpp11-cmake/blob/9c09479b7edfdc5e75f29a00e36a94394e688bdf/.travis.yml
Edit: Seeing https://docs.codecov.io/docs, maybethe "upload" step can be automatic, but all the lcov
stuff seems required.
As part of our ongoing transition to GitHub Actions at https://github.com/roboticslab-uc3m/questions-and-answers/issues/91, we decided to drop support for automated code coverage since we had not been using this tool anyway. In case it is deemed convenient to reinstate such support, see modern alternatives and complementary tools to Coveralls such as https://github.com/roboticslab-uc3m/questions-and-answers/issues/71 and https://github.com/roboticslab-uc3m/questions-and-answers/issues/68.
Marking as wontfix and closing due to obsolescence.
Our Travis lines for code coverage (via Coveralls) look like this (source):
Perhaps a bit too convoluted if we take a look at official docs:
Copy-paste from the latter:
More links (compiler flags et al.):