mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 15:10:20 -06:00
1
Tests/RunCMake/Configure/ReadOnly-result.txt
Normal file
1
Tests/RunCMake/Configure/ReadOnly-result.txt
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
8
Tests/RunCMake/Configure/ReadOnly-stderr.txt
Normal file
8
Tests/RunCMake/Configure/ReadOnly-stderr.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
CMake Error: Unable to \(re\)create the private pkgRedirects directory:
|
||||
[^
|
||||
]*/Tests/RunCMake/Configure/ReadOnly-build/CMakeFiles/pkgRedirects
|
||||
This may be caused by not having read/write access to the build directory.
|
||||
Try specifying a location with read/write access like:
|
||||
cmake -B build
|
||||
If using a CMake presets file, ensure that preset parameter
|
||||
'binaryDir' expands to a writable directory.
|
||||
1
Tests/RunCMake/Configure/ReadOnly.cmake
Normal file
1
Tests/RunCMake/Configure/ReadOnly.cmake
Normal file
@@ -0,0 +1 @@
|
||||
message(FATAL_ERROR "This should not be reached!")
|
||||
@@ -55,3 +55,19 @@ if(NOT RunCMake_GENERATOR MATCHES "^Ninja Multi-Config$")
|
||||
run_cmake(NoCMAKE_DEFAULT_BUILD_TYPE)
|
||||
run_cmake(NoCMAKE_DEFAULT_CONFIGS)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_HOST_WIN32)
|
||||
block()
|
||||
# Test a non-writable build directory.
|
||||
# Exclude when running as root because directories are always writable.
|
||||
get_unix_uid(uid)
|
||||
if(NOT uid STREQUAL "0")
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ReadOnly-build)
|
||||
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
||||
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
||||
file(CHMOD "${RunCMake_TEST_BINARY_DIR}" PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
set(RunCMake_TEST_NO_CLEAN 1)
|
||||
run_cmake(ReadOnly)
|
||||
endif()
|
||||
endblock()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user