[CMake] Running coverage analysis

David Doria daviddoria at gmail.com
Tue Jan 3 10:18:49 EST 2012


On Tue, Jan 3, 2012 at 9:52 AM, David Cole <david.cole at kitware.com> wrote:

> To actually run the coverage testing, you need to have tests added with
> add_test in your CMakeLists file, then you need to run a ctest -S script
> that calls ctest_coverage, or use one of the predefined coverage dashboard
> targets. (Use 'make help | grep Coverage' to see those.)
>

When I run 'make help' from that example project's build dir I just see

doriad at david-lab:~/build/Examples/CTest/Coverage$ make help
The following are some of the valid targets for this Makefile:
... all (the default if no target is provided)
... clean
... depend
... Coverage
... edit_cache
... rebuild_cache
... test
... coverage.o
... coverage.i
... coverage.s

I also ran 'make help | grep Coverage' in the VTK build dir (because I'd
assume the dashboard targets you're talking about would be in a big project
like VTK) but there is no output. Are these dashboard targets project
specific? That is, if I'm working on a project that does not have a
dashboard server, how would you see the coverage report?

It'd be great if someone could add a simple example script that calls
ctest_coverage to this example, along with the procedure to run it and
inspect the result: http://www.cmake.org/Wiki/CTest/Coverage/Example

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120103/1148e5f6/attachment.htm>


More information about the CMake mailing list