From 03c0812c41d4db2a48687ce0c053452906dfe69f Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 3 Feb 2015 10:36:17 -0500 Subject: 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. --- Modules/CTestCoverageCollectGCOV.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index dd10e83..a607c52 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) -- cgit v0.12