Gcov - Cmake - Shared Lib - Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux