Is it possible to produce gcov data files (.gcda files) by running an executable linked to a shared library built with the --coverage option?
Basically, I have the main library consisting of multiple c++ files compiled into one shared library and then a subdirectory called "test" containing a test program that links to and tests the main library. Everything compiles fine and the .gcno files are produced for both the library source files and the test source files. The .gcda files are only produced for the test source files though, but I really need them for the actual source files that are compiled into the shared library.
Any ideas?
Additional info:
- It's all C++ code
- Everything is being build with make scripts generated by automake
- The --coverage option is specified for lib_la_CPPFLAGS and lib_la_LDFLAGS in the shared library Makefile.am
- The --coverage option is specified for AM_CPPFLAGS and AM_LDFLAGS in test executable Makefile.am
- The test source files make use of Google Test (a C++ Unit Testing Framework)
Edit: fixed spacing problem