CMake/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
Orgad Shaneh ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00

11 lines
358 B
CMake

configure_file(NoSourcePermissions.sh NoSourcePermissions.sh.out
NO_SOURCE_PERMISSIONS)
if (UNIX AND NOT MSYS)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/NoSourcePermissions.sh.out
RESULT_VARIABLE result)
if (result EQUAL "0")
message(FATAL_ERROR "Copied file has executable permissions")
endif()
endif()