[CMake] CTest misses out with code coverage on files whose path is outside PROJECT_SOURCE_DIR
Wojciech Migda
wojtek.golf at interia.pl
Tue Oct 6 15:19:29 EDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have found a strange behaviour of ctest when performing code
coverage analysis for unit tests. When the unit test binary is linked
with a static library compiled from source files located outside the
PROJECT_SOURCE_DIR then although the *.gcov files are generated, they
are missed out from the final xml file.
LastCoverage_*.log from the Testing/Temporary folder contains the an
error of a form:
Errors:
Something went wrong. Cannot find file:
/home/scr/code_coverage/src_B/src_B.c in source dir:
/home/scr/code_coverage/dir_A or binary dir: /home/scr/code_c
overage/dir_A
Coverage.xml will then contain data for src_A library, but not for src_B.
If I make a symbolic link to src_B within dir_A (where top-level
CMakeLists.txt is located) then the code coverage will be summarized
for src_B as well.
Should I submit a bug ?
Tarball with an example is attached.
With best regards,
Wojtek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFKy5hA0iFl+nAyImcRAlkQAJwNLAuag/Teee8gxLvLaqfQarq5PACbBWJ4
zztljbPpvhQUYqwZ8KtbmqM=
=7ecV
-----END PGP SIGNATURE-----
---------------------------------------------------------------
Zapytaj wró¿kê!
Kliknij >>> http://link.interia.pl/f238d
-------------- next part --------------
A non-text attachment was scrubbed...
Name: code_coverage.tar.gz
Type: application/gzip
Size: 2137 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091006/98d750d0/attachment.bin>
More information about the CMake
mailing list