[CMake] Complete rebuild after svn update

Marcel Loose loose at astron.nl
Mon Oct 18 04:17:28 EDT 2010


On Mon, 2010-10-18 at 10:07 +0200, Eric Noulard wrote:
> 2010/10/18 Alex Brooks <a.brooks at marathon-targets.com>:
> > Hi,
> >
> > I have a problem where cmake decides to rebuild my entire source
tree when an
> > svn update pulls in a change to a CMakeLists.txt file.
> >
> > I have a fairly complicated build tree with a number of
sub-libraries etc.
> > The whole thing takes something like an hour to build, so it's a big
chunk out
> > of my day.
> >
> > I tried a few things to characterise the problem:
> >  - If I locally touch CMakeLists.txt files, or even make non-trivial
changes,
> > cmake does the correct thing and just rebuilds what is necessary.
> >  - If an svn update pulls in a changes to .h or .cpp files, cmake
again does
> > the correct thing.
> >  - If an svn update pulls in even a trivial change (e.g. a change to
a
> > comment), cmake rebuilds every single source file.
> >
> > I've run out of ideas about how to characterise the problem better,
does
> > anyone have any ideas what the problem might be, or what to do next
to track
> > it down further?
> 
> May be svn is the culprit.
> 
> Did you have a look at the timestamp of the file/directory enclosing
> (and up) the
> changed CMakeLists.txt after the svn update?
> 
> May be a single change inside a directory change the timestamp
> of a set of file?
> 
> Another option may be that this particular CMakeLists.txt is
generating
> (using configure_file) some file that is [indirectly] included by many
other?
> 
> May be you can have look at the dependencies in
> CMakeFiles/Makefile.cmake

Or do you use keyword expansion in your CMakeLists.txt file. Keywords,
like $Id$, $Author$, etc. are a relict from CVS, but still supported by
Subversion, though you have to explicitly activate it using properties.

An updated keyword could trigger a complete rebuild.

Regards,
Marcel Loose.





More information about the CMake mailing list