[Cmake] Execute permissions on a configured file

Brad King brad . king at kitware . com
Thu, 21 Aug 2003 08:33:25 -0400 (EDT)


> I'm using the CONFIGURE_FILE command to create a shell script. How can I
> force the created file to have execute permission?

CONFIGURE_FILE(..input.. ..output.. @ONLY IMMEDIATE)
EXEC_PROGRAM(chmod ARGS 755 ..output..)

The IMMEDIATE argument ensures that the output is created immediately when
CONFIGURE_FILE is called.  Be sure to use full paths for input and output.

-Brad