diff options
Diffstat (limited to 'Tests/RunCMake/if/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/if/RunCMakeTest.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/if/RunCMakeTest.cmake b/Tests/RunCMake/if/RunCMakeTest.cmake index efee116..0bfff90 100644 --- a/Tests/RunCMake/if/RunCMakeTest.cmake +++ b/Tests/RunCMake/if/RunCMakeTest.cmake @@ -2,6 +2,23 @@ include(RunCMake) run_cmake(InvalidArgument1) run_cmake(exists) +if(NOT MSYS) + # permissions and symbolic links are broken on MSYS + unset(uid) + unset(status) + if(UNIX) + set(ID "id") + if (CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND EXISTS "/usr/xpg4/bin/id") + set (ID "/usr/xpg4/bin/id") + endif() + # if real user is root, tests are irrelevant + execute_process(COMMAND ${ID} -u $ENV{USER} OUTPUT_VARIABLE uid ERROR_QUIET + RESULT_VARIABLE status OUTPUT_STRIP_TRAILING_WHITESPACE) + endif() + if(NOT status AND NOT uid STREQUAL "0") + run_cmake(FilePermissions) + endif() +endif() run_cmake(IsDirectory) run_cmake(IsDirectoryLong) run_cmake(duplicate-deep-else) |