Difference between revisions of "CTest/Coverage"

From KitwarePublic
Jump to navigationJump to search
(Replace content with link to new CMake community wiki)
(27 intermediate revisions by 9 users not shown)
Line 1: Line 1:
==Coverage With C++==
Currently coverage is only supported on gcc compiler. To perform coverage test, make sure that your code is build with debug symbols, without optimization, and with special flags. These flags are:
This page has moved [https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Coverage here].
-fprofile-arcs -ftest-coverage
Also make sure to pass these flags to C compiler, CXX compiler, and the linker. For example:
CXXFLAGS="-g -O0 -Wall -W -Wshadow -Wunused-variable \
  -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers \
  -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage"
CFLAGS="-g -O0 -Wall -W -fprofile-arcs -ftest-coverage"
LDFLAGS="-fprofile-arcs -ftest-coverage"
==Coverage With Python==

Latest revision as of 11:41, 30 April 2018

The CMake community Wiki has moved to the Kitware GitLab Instance.

This page has moved here.