> Before running this cmake script, I am setting executable permissions on the > build machine, where the package is created.
With install(FILES ...) command permissions set to source file will be ignored by default (this is missing from documentation). You could set permissions with PERMISSIONS attribute. See: https://cmake.org/cmake/help/v3.5/command/install.html#installing-files > Then, I create a docker image, where this RPM is downloaded and installed. > But when I want to start the executable within a docker container, then I am > getting the message "permission denied". > When I look at the permissions of my installed package, then I see, I only > have read permissions. Since CPack relies on install commands to set permissions this is expected behaviour. > So the question is: What can I do for getting executable permissions for > this executable? Is this a CMake/CPack problem? For now either set PERMISSIONS or move executable into separate directory and use install(DIRECTORY ... USE_SOURCE_PERMISSIONS) This could probably be supported by adding USE_SOURCE_PERMISSIONS for install(FILES ...) would you be willing to contribute a patch? Regards, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
