summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-04 14:40:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-12-04 14:40:20 (GMT)
commit4b13f8866d2950748303ab6fc2462ec7ec4b655f (patch)
treeb00cd3b62c084dac227059ef8c16ee89e852788e /Source
parent593b9297604c61334528dc68c0318c396fd9e454 (diff)
parent0fd64345fe445797f5b2d89c1371e421d915dc9b (diff)
downloadCMake-4b13f8866d2950748303ab6fc2462ec7ec4b655f.zip
CMake-4b13f8866d2950748303ab6fc2462ec7ec4b655f.tar.gz
CMake-4b13f8866d2950748303ab6fc2462ec7ec4b655f.tar.bz2
Merge topic 'cmake-non-writable-build-dir'
0fd64345fe Tests: Add case covering non-writable CMAKE_BINARY_DIR d91c02e40f Tests: Factor out RunCMake helper to get UNIX user id 5799d0e788 cmake: Improve error message if CMAKE_BINARY_DIR not writable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !8970
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 942c59b..002a020 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2397,8 +2397,15 @@ int cmake::ActualConfigure()
cmSystemTools::RemoveADirectory(redirectsDir);
if (!cmSystemTools::MakeDirectory(redirectsDir)) {
cmSystemTools::Error(
- "Unable to (re)create the private pkgRedirects directory:\n" +
- redirectsDir);
+ cmStrCat("Unable to (re)create the private pkgRedirects directory:\n ",
+ redirectsDir,
+ "\n"
+ "This may be caused by not having read/write access to "
+ "the build directory.\n"
+ "Try specifying a location with read/write access like:\n"
+ " cmake -B build\n"
+ "If using a CMake presets file, ensure that preset parameter\n"
+ "'binaryDir' expands to a writable directory.\n"));
return -1;
}
this->AddCacheEntry("CMAKE_FIND_PACKAGE_REDIRECTS_DIR", redirectsDir,