diff options
author | scivision <scivision@users.noreply.github.com> | 2023-11-13 16:48:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-30 19:23:57 (GMT) |
commit | 5799d0e78879ee60a4efa3ecbeae1076d2bef15f (patch) | |
tree | 384e16f4b0c64055edba9dc4a4707f6620dc8c42 | |
parent | 69f0dd42b063296ab96a3ab61392b36cadab04b8 (diff) | |
download | CMake-5799d0e78879ee60a4efa3ecbeae1076d2bef15f.zip CMake-5799d0e78879ee60a4efa3ecbeae1076d2bef15f.tar.gz CMake-5799d0e78879ee60a4efa3ecbeae1076d2bef15f.tar.bz2 |
cmake: Improve error message if CMAKE_BINARY_DIR not writable
Fixes: #24407
-rw-r--r-- | Source/cmake.cxx | 11 |
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, |