Feature Request: Allow change of permissions of files inplace
Some projects require to generate executable scripts, since the source for the scripts don't have execute permissions we face an issue while testing on Unix platforms.
Current way
configure_file(executable_script.in temp/executable_script)
file(COPY ${CMAKE_BINARY_DIR}/temp/executable_script DESTINATION ${CMAKE_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ)
file(REMOVE ${CMAKE_BINARY_DIR}/temp/executable_script)
Proposed way
configure_file(executable_script.in executable_script)
file(PERMISSIONS ${CMAKE_BINARY_DIR}/executable_script ADD OWNER_EXECUTE)
Proposed API
file(PERMISSIONS files... [ADD,REMOVE,SET] perms...)
Thank You,
Sibi Siddharthan