[CMake] Put svn revision into file on every "make install"

Eric Noulard eric.noulard at gmail.com
Mon Jun 15 07:37:50 EDT 2009


2009/6/15 Jean-Pierre Bergamin <james at ractive.ch>:
> Hello cmake users
>
> I want to put the current subversion revision into a script every time I run
> "make install".
> Currently, I use configure_file() to replace a variable in the script, but
> this only updates the script when either the script or something in
> CMakeLists.txt changes.
>
> Is there a way to update the script every time I run "make install"?

Did you try with
install([[SCRIPT <file>] [CODE <code>]] [...])

using this you may execute a CMake script at install time.



-- 
Erk


More information about the CMake mailing list