diff options
author | Cristian Morales Vega <cristian@samknows.com> | 2019-04-23 16:17:26 (GMT) |
---|---|---|
committer | Cristian Morales Vega <cristian@samknows.com> | 2019-05-03 20:28:28 (GMT) |
commit | 41d262bd3ddf752a28f8e926b19bcc24224f8303 (patch) | |
tree | 9ccff6f691107303395c02f93c6554bc1a34a5d7 /Modules | |
parent | 911b97867b72226df7cfab95374a6c2b89d9ffa3 (diff) | |
download | CMake-41d262bd3ddf752a28f8e926b19bcc24224f8303.zip CMake-41d262bd3ddf752a28f8e926b19bcc24224f8303.tar.gz CMake-41d262bd3ddf752a28f8e926b19bcc24224f8303.tar.bz2 |
CTestCoverageCollectGCOV: run gcov with -x
Using "-x" we avoid overwriting .gcov files from source files in
different paths which happen to have the same name. It's similar to
"-p", but it produces shorter file names, reducing the risk of reaching
the file system limit.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CTestCoverageCollectGCOV.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index 8b029ee..655827a 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -52,7 +52,7 @@ After generating this tar file, it can be sent to CDash for display with the ``GCOV_OPTIONS <options>...`` Specify options to be passed to gcov. The ``gcov`` command is run as ``gcov <options>... -o <gcov-dir> <file>.gcda``. - If not specified, the default option is just ``-b``. + If not specified, the default option is just ``-b -x``. ``GLOB`` Recursively search for .gcda files in build_dir rather than @@ -135,7 +135,7 @@ function(ctest_coverage_collect_gcov) # run gcov, this will produce the .gcov files in the current # working directory if(NOT DEFINED GCOV_GCOV_OPTIONS) - set(GCOV_GCOV_OPTIONS -b) + set(GCOV_GCOV_OPTIONS -b -x) endif() execute_process(COMMAND ${gcov_command} ${GCOV_GCOV_OPTIONS} ${gcda_files} |