[CMake] Running coverage analysis

David Cole david.cole at kitware.com
Tue Jan 3 09:52:04 EST 2012


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.)


On Jan 2, 2012, at 9:21 PM, David Doria <daviddoria at gmail.com> wrote:

> I found this wiki page:
> 
> http://www.vtk.org/Wiki/CTest/Coverage#Coverage_With_C.2B.2B
> 
> that explains the flags that are necessary. I set up a demo project here and it compiles:
> 
> http://www.vtk.org/Wiki/CTest/Coverage/Example
> 
> However, how do you actually run the coverage analysis? I ran 'ctest' but there are no magic tests that were setup. Are there more instructions somewhereon performing and viewing the coverage?
> 
> Thanks,
> 
> David
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120103/f4256f88/attachment.htm>


More information about the CMake mailing list