|
Notes |
|
|
(0021387)
|
|
Zach Mullen
|
|
2010-07-13 13:36
|
|
I tried to reproduce this error using a small test project which I've attached. The problem is that for my small project gcov is only generating coverage files for the cxx files, not for their corresponding header files. Do you know why this is happening / how I can make gcov create coverage files for the headers?
Also, I've confirmed that this bug doesn't happen with .cxx files:
http://www.cdash.org/CDash/viewCoverage.php?buildid=663844&status=2 [^] |
|
|
|
(0021445)
|
|
Jason Nye
|
|
2010-07-21 17:47
|
|
Our header files have code in them (i.e.: a class with inline member functions). The source files include the corresponding headers without the full path (telling the preprocessor to get them from the current directory).
We've also been adding the following two compiler options to tell the compiler not to inline anything in debug builds:
-fno-default-inline : Prevents gcc from inlineing functions defined inside a classs scope (but they will still have linkage like inline functions)
-fkeep-inline-functions : emit any functions linked as inline functions into the object files (causing them to be compiled even if they aren’t called)
Note that the issue occurs whether or not the flags are set; these flags may
simply help you get coverage data for the headers a little more easily.
Thanks for looking into this! |
|
|
|
(0024631)
|
|
Jason Nye
|
|
2011-01-12 14:36
|
|
Just uploaded a minimal project to repro the issue. This was run on ubuntu 10.04.
Please continue to investigate. |
|
|
|
(0028281)
|
|
Sean McBride
|
|
2012-01-12 16:47
|
|
|
|
|
(0041721)
|
|
Kitware Robot
|
|
2016-06-10 14:28
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|