bilke / cmake-modules

Additional CMake functionality. Most of the modules are from Ryan Pavlik (https://github.com/rpavlik/cmake-modules)
Boost Software License 1.0
542 stars 215 forks source link

Code coverage verbose mode and way to add additional gcovr arguments #56

Closed robamu closed 3 years ago

robamu commented 3 years ago

I added an additional CODE_COVERAGE_VERBOSE option to add additional output to the CMake configuration. This includes printing all the run LCOV commands so they can be verified if there are issues.

bilke commented 3 years ago

Thanks I like the idea but it would be better when the call would be saved to variable which then would be used both by call as well the debug output so that this always stays in sync.

robamu commented 3 years ago

I updated the pull request.

  1. I implemented your suggestion
  2. I added the print support to the gcvor XML output. I would be nice if you could test that.. I'm not sure how to verify the generated XML files
  3. I added another feature: Users can set the GCOVR_ADDITIONAL_ARGS variable now to supply additional flags to the GCVOR command. I used this to supply --exclude-throw-branches --exclude-unreachable-branches to the GCVOR command

I tested the GCVOR HTML output on Windows 10 and the LCOV HTML output on Linux (Ubuntu 20.04) for our Catch2 unit tests.