[vtk-developers] Wrappers: incremental build rebuid everything

David Gobbi david.gobbi at gmail.com
Fri Jul 2 14:02:02 EDT 2010


On Fri, Jul 2, 2010 at 11:45 AM, David Cole <david.cole at kitware.com> wrote:
> Make sure that full paths are used in expressing custom command
> dependencies. Otherwise, you will see differences in rebuild behavior
> depending on what version of CMake you're using.

I think I've done this throughout, but since there are rebuild
problems I'd better double-check.

My difficulty with getting dependencies right is that each "hierarchy"
file actually depends on the hierarchy files of all kits that its kit
depends on.  Because CMake cannot handle file dependencies between
sibling directories, I make it depend on the kit libraries instead.
Then there is the rebuild-only-if-changed trick, and the fake target
trick, which are supposed to keep the everything from rebuilding like
Francois is seeing.

If worse come to worst, I can temporarily turn off the hierarchy stuff
and cut the dependencies.  But I would like to continue poking at it
at least for today.

   David

> I'm pretty confident that using full paths everywhere to express OUTPUT and
> DEPENDS eliminates this problem. (Assuming there are no other mistakes in
> the code...)
> Sounds like things depending on vtkRendering are the bits that are
> re-building. Perhaps there's a conditional rule in an
> "if(VTK_USE_RENDERING)" block...?
>
>
> Just some thoughts,
> David
>
> On Fri, Jul 2, 2010 at 1:31 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>
>> 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
>> >
>> >
>> _______________________________________________
>> 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