This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Gcov - Cmake - Shared Lib - Problem
- From: Alex Büchel <kotzerich666 at yahoo dot de>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 24 May 2012 15:16:44 +0100 (BST)
- Subject: Gcov - Cmake - Shared Lib - Problem
- Reply-to: Alex Büchel <kotzerich666 at yahoo dot de>
Hi guys,
I am working on a CmakeProjekt. This Projekt creates a shared Library,
lets call it lib_shared. This shared library will be created in the
following directory: /home/username/project/build/sharedlibdirectory/ .
THEN this Cmake project builds a testrun-executable in the following path:
/home/username/project/build/testrundirectory/ . The shared library
lib_shared is linked against this test-executable.
Everything works fine.
My problem appears when i try to use Gcov for this projekt. Of course i
want to have the code coverage of the sourcefiles of the sharedlibrary.
I have used the flag "--coverage" and created the gcno files:
The gcno-Files for the test-exectutable will be created in /home/username/project/build/testrundirectory/CMakeFiles/testrundirectory.dir/
The gcno-Files for the shared library will be created in
/home/username/project/build/sharedlibdirectory/CMakeFiles/sharedlibdirectory.dir/
Then i have started the testrun.
The gcda Files of this testrun will be created in
/home/username/project/build/testrundirectory/CMakeFiles/testrundirectory.dir/ . Good.
But i need the gcda files of the shared library. They dont appear nowhere.
I tried a lot with GCOV_PREFIX and GCOV_PREFIX_SPLIT but i think i have
some problem to set the correct path, especially with handling these
Cmake-Dirs.
Can somebody tell me which path do i have to set with these environment variables?
Or did i forget something? I mean there is actually everything what i need but not the gdca-file of the shared lib.
Thanks
Daniel