diff options
author | Brad King <brad.king@kitware.com> | 2022-08-17 12:45:07 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-08-17 12:45:19 (GMT) |
commit | 2216826ff81e97276bef65dde54fe24293f44ea0 (patch) | |
tree | 9934c164fffd9f194407d0e9e372e53ebe89cc74 | |
parent | 8c144f06820767c1338162cb020a5c2a30cf26eb (diff) | |
parent | 0ccaa7ecb93778a91a67e0658e39082f29d29644 (diff) | |
download | CMake-2216826ff81e97276bef65dde54fe24293f44ea0.zip CMake-2216826ff81e97276bef65dde54fe24293f44ea0.tar.gz CMake-2216826ff81e97276bef65dde54fe24293f44ea0.tar.bz2 |
Merge topic 'fix-gcov-test'
0ccaa7ecb9 Tests: Fix GCOV test in unusual environments
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7580
-rw-r--r-- | Tests/CTestCoverageCollectGCOV/test.cmake.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in b/Tests/CTestCoverageCollectGCOV/test.cmake.in index a36f374..7c7a3e5 100644 --- a/Tests/CTestCoverageCollectGCOV/test.cmake.in +++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in @@ -34,9 +34,10 @@ set(expected_out # then back to relative to get them in canonical form (or maybe this is a bug # in how the tarball is generated?) function(to_relative_paths real_paths paths) + file(REAL_PATH "${CTEST_BINARY_DIRECTORY}" base) foreach(file ${paths}) - file(REAL_PATH "${file}" real_path BASE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") - file(RELATIVE_PATH relative_path "${CTEST_BINARY_DIRECTORY}" "${real_path}") + file(REAL_PATH "${file}" real_path BASE_DIRECTORY "${base}") + file(RELATIVE_PATH relative_path "${base}" "${real_path}") list(APPEND local_real_paths "${relative_path}") message(DEBUG "${file} -> ${real_path} -> ${relative_path}") endforeach() |