summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
blob: 18deb895177108b8ab8d5a4dfbcf2dd52b8bcfd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 MSYS AND NOT "${uid}" STREQUAL "0")
  run_cmake(CHMOD-write-only)
endif()