mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-28 04:09:35 +03:00
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.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user