summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-30 20:38:31 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-30 20:41:20 (GMT)
commitd3ac4e8246b0c48d1eabe80dd106a51a7bc51900 (patch)
tree304fa1ca7fc14416e8903edf66c8251d5c368130
parent9b4efcb92fc200d20b1ff3027cf819232db7060c (diff)
downloadCMake-d3ac4e8246b0c48d1eabe80dd106a51a7bc51900.zip
CMake-d3ac4e8246b0c48d1eabe80dd106a51a7bc51900.tar.gz
CMake-d3ac4e8246b0c48d1eabe80dd106a51a7bc51900.tar.bz2
Tests: Teach RunCMake.SymlinkTrees to tolerate CCACHE_BASEDIR
If the test is driven with a `ccache`-wrapped compiler then the `CCACHE_BASEDIR` environment variable might break paths the test checks. Fixes: #23885
-rw-r--r--Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
index e5bfac4..58a111a 100644
--- a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
+++ b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
@@ -1,5 +1,8 @@
include(RunCMake)
+# Do not let ccache modify paths checked by the test cases.
+unset(ENV{CCACHE_BASEDIR})
+
function(run_symlink_test_case)
file(REMOVE_RECURSE
"${RunCMake_TEST_BINARY_DIR}/CMakeCache.txt"