Trying to get code coverage up and running, and I'm just reading documentation first. I found a few articles that mention building with the --coverage
flag, while others mention the --ftest-coverage
.
Both descriptions seem to say they do the same thing, but I'm not certain.
Here's two articles:
What's the difference?
As already stated in the comments --coverage
is a synonym for other flags related to code coverage depending on the context.
3.11 Program Instrumentation Options:
--coverage
This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs -ftest-coverage (when compiling) and -lgcov (when linking).