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
547 stars 214 forks source link

geninfo: WARNING: no .gcno files found in . - skipping! #74

Closed PriceHoward closed 1 year ago

PriceHoward commented 2 years ago

I was using a previous version of this code coverage and wanted to update to this one as I see it is better maintained. I am running into an issue though. When I try to make my_coverage_target I am getting: Capturing coverage data from . Found gcov version: 9.3.1 Using intermediate gcov format Scanning . for .gcno files ... geninfo: WARNING: no .gcno files found in . - skipping! Finished .info-file creation

It seems there is no .gcno file being created when I am running this coverage. Does anyone have any ideas on a solution to this issue? Do I need to run this as a Debug to make it work?

Thanks!

PriceHoward commented 1 year ago

Found the solution to the issue.

append_coverage_compiler_flags_to_target(YOUR_TARGET_NAME) Did not work on my system. but using the generic append_coverage_compiler_flag() did.