diff options
Diffstat (limited to 'Tests/RunCMake/configure_file/NoSourcePermissions.cmake')
-rw-r--r-- | Tests/RunCMake/configure_file/NoSourcePermissions.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/configure_file/NoSourcePermissions.cmake b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake new file mode 100644 index 0000000..c6ad131 --- /dev/null +++ b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake @@ -0,0 +1,10 @@ +configure_file(NoSourcePermissions.sh NoSourcePermissions.sh.out + NO_SOURCE_PERMISSIONS) + +if (UNIX) + 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() |