gcov - generate only for single file in a library

Hi

I have written a library which compiles to a static library file. I have also written some unit tests which are executed via test.cpp. All of this is generated via a makefile.

When running my unit tests I would like to see the code coverage using gcov. I have therefore amended by makefile compilation flags by including:

 
 -fprofile-arcs -ftest-coverage


I have added these flags when compiling the static library file and also when compiling and linking test.cpp (to produce test.exe). How do I do this?

The problem is that each time I run test.exe then a huge number of gcov files are generated - for each file in my library. What I would like to do is only generate the gcov files for a specific file in my library.

Thanks

Last edited on
Topic archived. No new replies allowed.