CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Code coverage

Last modified: 09 September 2023

In CLion, you can run CMake applications and tests with code coverage measurements. Code coverage results provide the percentage of code lines executed during a run and the number of times a particular line was hit.

CLion relies on llvm-cov/gcov integration to collect and show code coverage data. These tools require special coverage compiler flags, which you can pass manually or let CLion add them automatically.