summaryrefslogtreecommitdiff
path: root/Modules/CTestCoverageCollectGCOV.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-03 10:36:17 -0500
committerBrad King <brad.king@kitware.com>2015-02-03 10:40:58 -0500
commit03c0812c41d4db2a48687ce0c053452906dfe69f (patch)
treef2901d550580a54d69a4fc9779920b1bb5da72eb /Modules/CTestCoverageCollectGCOV.cmake
parent8caa4e72abe4393914f4dcefd1621d3c86a7d139 (diff)
downloadcmake-03c0812c41d4db2a48687ce0c053452906dfe69f.tar.gz
CTestCoverageCollectGCOV: Fix handling of international characters
When loading the list of target support directories, read the file with UTF-8 encoding since that is what CMake writes into the file. This allows us to support international characters in the path to the build tree containing the target support directories.
Diffstat (limited to 'Modules/CTestCoverageCollectGCOV.cmake')
-rw-r--r--Modules/CTestCoverageCollectGCOV.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake
index dd10e83859..a607c529a3 100644
--- a/Modules/CTestCoverageCollectGCOV.cmake
+++ b/Modules/CTestCoverageCollectGCOV.cmake
@@ -90,7 +90,8 @@ function(ctest_coverage_collect_gcov)
# look for gcda files in the target directories
# could do a glob from the top of the binary tree but
# this will be faster and only look where the files will be
- file(STRINGS "${binary_dir}/CMakeFiles/TargetDirectories.txt" target_dirs)
+ file(STRINGS "${binary_dir}/CMakeFiles/TargetDirectories.txt" target_dirs
+ ENCODING UTF-8)
foreach(target_dir ${target_dirs})
file(GLOB_RECURSE gfiles RELATIVE ${binary_dir} "${target_dir}/*.gcda")
list(LENGTH gfiles len)