2009/12/10 kent williams <nkwmailingli...@gmail.com>: > Say I generate a script using CONFIGURE_FILE. How would I make it > executable? In other words, is there a CMake way of doing this that > will work on all CMake platforms?
I don't think you can change permission in a portable manner at CMake time. You may set permission using PERMISSIONS option of the CMake INSTALL command (thus at install time), however I guess you'd like to use your generated scripts during build time and not after install time? If you want to run your script at either CMake or build time using execute_process and/or add_custom_command keep reading... > The way we deal with portability in our particular case is to use Tcl > scripts. Our stuff won't work on any platform without tcl, so tclsh > is the 'most portable' script processor. If you know that your script in a tcl one AND you must run it at CMake or build time then you can explicitely call tcslh <yourscript> if you do that you can do: FIND_PACKAGE(Tclsh) ${TCL_TCLSH} should contain a valid tclsh interpreter. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake