summaryrefslogtreecommitdiffstats
path: root/Modules/CTestCoverageCollectGCOV.cmake
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2016-04-04 18:04:35 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2016-04-04 18:04:35 (GMT)
commitc5ff34cc4703ee296b4bcf8a8ac17e1a9046af26 (patch)
treef9c8f79d9f38e8d2cad03b7700e71046fa820889 /Modules/CTestCoverageCollectGCOV.cmake
parentff6211e6358a1c7ea6dff9a37cb8ac24308df5d7 (diff)
downloadCMake-c5ff34cc4703ee296b4bcf8a8ac17e1a9046af26.zip
CMake-c5ff34cc4703ee296b4bcf8a8ac17e1a9046af26.tar.gz
CMake-c5ff34cc4703ee296b4bcf8a8ac17e1a9046af26.tar.bz2
CTestCoverageCollectGCOV: specify base dir for GLOB_RECURSE
Consistently glob for .gcda files in the binary directory. Previously the behavior of this function depended on the current working directory that it was called from.
Diffstat (limited to 'Modules/CTestCoverageCollectGCOV.cmake')
-rw-r--r--Modules/CTestCoverageCollectGCOV.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake
index f31e432..54c53d2 100644
--- a/Modules/CTestCoverageCollectGCOV.cmake
+++ b/Modules/CTestCoverageCollectGCOV.cmake
@@ -99,11 +99,11 @@ function(ctest_coverage_collect_gcov)
set(gcda_files)
set(label_files)
if (GCOV_GLOB)
- file(GLOB_RECURSE gfiles RELATIVE ${binary_dir} "*.gcda")
+ file(GLOB_RECURSE gfiles RELATIVE ${binary_dir} "${binary_dir}/*.gcda")
list(LENGTH gfiles len)
# if we have gcda files then also grab the labels file for that target
if(${len} GREATER 0)
- file(GLOB_RECURSE lfiles RELATIVE ${binary_dir} "Labels.json")
+ file(GLOB_RECURSE lfiles RELATIVE ${binary_dir} "${binary_dir}/Labels.json")
list(APPEND gcda_files ${gfiles})
list(APPEND label_files ${lfiles})
endif()