summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorSibi Siddharthan <sibisiddharthan.github@gmail.com>2020-08-11 18:33:59 (GMT)
committerSibi Siddharthan <sibisiddharthan.github@gmail.com>2020-08-26 15:52:50 (GMT)
commit7de60beddf5b41f643e187fe487ffb91cd47e9f7 (patch)
treeeb7719b6896f43414a5aea8d4ea5249ed33f21b2 /Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
parent675be013e90eb1ae86e4259b55116d29cf2e1d73 (diff)
downloadCMake-7de60beddf5b41f643e187fe487ffb91cd47e9f7.zip
CMake-7de60beddf5b41f643e187fe487ffb91cd47e9f7.tar.gz
CMake-7de60beddf5b41f643e187fe487ffb91cd47e9f7.tar.bz2
file: Add CHMOD and CHMOD_RECURSE subcommands
Fixes: #21057 Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
Diffstat (limited to 'Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
new file mode 100644
index 0000000..c7bff15
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
@@ -0,0 +1,19 @@
+include(RunCMake)
+
+run_cmake(CHMOD-no-perms)
+run_cmake(CHMOD-no-keyword)
+run_cmake(CHMOD-all-perms)
+run_cmake(CHMOD-invalid-perms)
+run_cmake(CHMOD-invalid-path)
+run_cmake(CHMOD-ok)
+run_cmake(CHMOD-override)
+
+if(UNIX)
+ execute_process(COMMAND id -u $ENV{USER}
+ OUTPUT_VARIABLE uid
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
+
+if(NOT WIN32 AND NOT "${uid}" STREQUAL "0")
+ run_cmake(CHMOD-write-only)
+endif()