I’m looking for a way to prevent the
install(FILES <myfile> DESTINATION <myfolder>) to re-install
<myfile> when the file at destination
<folder>/<myfile> is newer than the source.
To put things into context:
We install our runtime configuration files for debugging and tuning our science algorithms at the same time than our libs and executables. These files can be modified on the fly by the user to enable/disable some log outputs and change some constants, so we really only need them to be updated only if the original file in the project source tree is newer than the one at destination (for instance when a new mandatory parameter has been added) so we don’t overwrite the changes made by the user to the destination file in the meantime.
As of this moment, every call to
make install re-installs the source tree version, which is a bit frustrating.