[CMake] Avoid overwriting files at installation time

Brad King brad.king at kitware.com
Wed Aug 30 12:11:44 EDT 2006


Alexander Neundorf wrote:
> -------- Original-Nachricht --------
> Datum: Wed, 30 Aug 2006 12:38:40 +0100
> Von: Marco Canini <marco.canini at fastwebnet.it>
> An: CMake ML <cmake at cmake.org>
> Betreff: [CMake] Avoid overwriting files at installation time
> 
>> Hi,
>> is there a way to not install a file (e.g. config file) is it's already
>> present in the destination?
> 
> With cmake 2.4.x this doesn't happen (although the filename is still printed on stdout). Not sure about earlier cmake versions.

What Alex means is that in CMake 2.4 files are not overwritten unless
the new ones are different in order to preserve modification times.  I
think what you want though is to install a file only if it is not
already installed whether it is different or not.  This way a default
config file can be installed but the user can edit it without worrying
about a future installation blowing away changes.  Correct?

-Brad


More information about the CMake mailing list