[vtk-developers] Wrappers: incremental build rebuid everything

David Gobbi david.gobbi at gmail.com
Fri Jul 2 13:31:30 EDT 2010


I'm using CMake 2.6.4 and don't see this issue.  But I can offer some
clues.  Here are how the dependencies are set up, with respect to the
new vtkWrapHierarchy tool.

The hierarchy files like vtkFilteringHierarchy.txt are built by a
CMAKE_CUSTOM_COMMAND as a pre-build step for each kit library.  The
wrappers, of course, depend on this Hierarchy.txt file.

My vtkWrapHierarchy.exe very specifically pre-reads the kit's
Hierarchy.txt file it and only re-writes it if the hierarchy has
changed.  This is done specifically to avoid the wrapper re-builds
like you are seeing.  For me, this works like a charm.

I have another CMAKE_CUSTOM_COMMAND that builds a fake target for the
kit hierarchy file (see CMake/vtkWrapHierarchy.cmake).  It does the
following:

OUTPUTS: vtkFilteringHierarchy.target vtkFilteringHierarchy.txt
DEPENDS: vtkFiltering
COMMAND: touch vtkFilteringHierarchy.target

So the trick is: the wrappers require vtkFilteringHierarchy.txt, which
depends on vtkFiltering, but the timestamp for
vtkFilteringHierarchy.txt is only ever updated when the header files
are changed sufficiently to change the hierarchy.  Hence,
wrapper-rebuilds are only forced if the hierarchy changes.  For you it
seems to be short-circuiting and rebuilding the wrappers whenever the
kit library is rebuilt.

This could reflect changes in the way that CMake handles dependencies,
or it could depend on the build tool that you use.  I always use make
and nmake, and I haven't tried a devenv build to see what devenv does.

   David

On Fri, Jul 2, 2010 at 11:15 AM, Francois Bertel
<francois.bertel at kitware.com> wrote:
> Hello,
>
> I'm facing a very annoying issue with VTK git master.
>
> Each time I type "make", without modifying any file in the source
> tree, the Tcl wrappers are regenerated and recompiled for Rendering,
> VolumeRendering, Hybrid, Parallel, Widgets, Infovis, Views,
> Charts/Geovis.
>
> Does anybody has a clue?
> Does anybody else have this issue?
>
> PS: I'm using cmake 2.8.2
>
> --
> François Bertel, PhD  | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
>                      | Clifton Park NY 12065, USA
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list