[CMake] Avoid overwriting files at installation time

Marco Canini marco.canini at fastwebnet.it
Wed Aug 30 14:49:48 EDT 2006


Hi,
that's correct.
In this case a config file should be installed only if it doesn't exist
in order to preserve what the user wrote.
But I guess cmake doesn't support it yet.

Brad King wrote:
> 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
> 


-- 
Marco Canini


More information about the CMake mailing list