summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file-CHMOD/write-only.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/file-CHMOD/write-only.cmake')
-rw-r--r--Tests/RunCMake/file-CHMOD/write-only.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/file-CHMOD/write-only.cmake b/Tests/RunCMake/file-CHMOD/write-only.cmake
new file mode 100644
index 0000000..1289efc
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/write-only.cmake
@@ -0,0 +1,6 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a "CONTENT")
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_WRITE)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a content)