[CMake] cmake install behaviour with git
Nils Gladitz
nilsgladitz at gmail.com
Thu Oct 1 03:37:40 EDT 2015
On 10/01/2015 08:35 AM, Jörg Kreuzberger wrote:
> This comes from installs, there we install some configuration files with the builded targets.
> e.g. you install a builded executable, together with an config xml file from SCM.
> If you make a product install, you want to "overwrite" the original config xml with an "product" xml config
> file, also from the SCM.
>
> So there are two install steps, the second "configure/modify" some files of the first. This worked cause the file
> timestamps differed. Now not, cause the second install gets "Up-to-date" message and has to use CMAKE_ALWAYS_INSTALL.
I don't comprehend this at all.
Why would the two instances of the config file with distinct content
have the same modification time in this scenario?
Could you provide a minimal, self-contained test case that reproduces
this issue?
> I do agree with you, except for this scenario of non-builded files. So the question is ok, why not consider the file size in up-to-date check.
> Should be not to expensive to get this information together with the file time from the os.
I don't think that makes much sense.
A modified file is much more likely to retain its size than its
modification time.
So if modification times really stay the same for some reason the file
size on its own would be a very error prone change indicator.
Nils
More information about the CMake
mailing list