I generate a script (shell on *nix, *.bat on windows) using FILE(WRITE which I then install using INSTALL(PROGRAMS so that the permissions are set properly. However, I'd like to first test it from within CMake using EXECUTE_PROCESS but that obviously fails since the script does not have execute permission at this stage. Any suggestions? Thanks, --Radu