[CMake] Backup copy on install?

Bill Hoffman bill.hoffman at kitware.com
Tue Jun 9 15:00:23 EDT 2015


On 6/9/2015 1:56 PM, Chris Johnson wrote:
>
> We do use a globally included set of CMake rules in all of our
> CMakeLists.txt files, so if there's a bit of code that could be added
> there, that would be sufficient.
>
> All suggestions welcome!
>
You might be able to do something with install(CODE ...)

At the end of the day the install step is just running generated cmake 
code.  If you look in your build tree there are files like this: 
cmake_install.cmake.  With install(CODE), you can inject your own code 
into those files.

-Bill



More information about the CMake mailing list