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.<div><br></div><div>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...)</div>
<div><br></div><div>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...?<br><br></div><div><br></div><div>
Just some thoughts,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">On Fri, Jul 2, 2010 at 1:31 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I'm using CMake 2.6.4 and don't see this issue. But I can offer some<br>
clues. Here are how the dependencies are set up, with respect to the<br>
new vtkWrapHierarchy tool.<br>
<br>
The hierarchy files like vtkFilteringHierarchy.txt are built by a<br>
CMAKE_CUSTOM_COMMAND as a pre-build step for each kit library. The<br>
wrappers, of course, depend on this Hierarchy.txt file.<br>
<br>
My vtkWrapHierarchy.exe very specifically pre-reads the kit's<br>
Hierarchy.txt file it and only re-writes it if the hierarchy has<br>
changed. This is done specifically to avoid the wrapper re-builds<br>
like you are seeing. For me, this works like a charm.<br>
<br>
I have another CMAKE_CUSTOM_COMMAND that builds a fake target for the<br>
kit hierarchy file (see CMake/vtkWrapHierarchy.cmake). It does the<br>
following:<br>
<br>
OUTPUTS: vtkFilteringHierarchy.target vtkFilteringHierarchy.txt<br>
DEPENDS: vtkFiltering<br>
COMMAND: touch vtkFilteringHierarchy.target<br>
<br>
So the trick is: the wrappers require vtkFilteringHierarchy.txt, which<br>
depends on vtkFiltering, but the timestamp for<br>
vtkFilteringHierarchy.txt is only ever updated when the header files<br>
are changed sufficiently to change the hierarchy. Hence,<br>
wrapper-rebuilds are only forced if the hierarchy changes. For you it<br>
seems to be short-circuiting and rebuilding the wrappers whenever the<br>
kit library is rebuilt.<br>
<br>
This could reflect changes in the way that CMake handles dependencies,<br>
or it could depend on the build tool that you use. I always use make<br>
and nmake, and I haven't tried a devenv build to see what devenv does.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="h5"><br>
On Fri, Jul 2, 2010 at 11:15 AM, Francois Bertel<br>
<<a href="mailto:francois.bertel@kitware.com">francois.bertel@kitware.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm facing a very annoying issue with VTK git master.<br>
><br>
> Each time I type "make", without modifying any file in the source<br>
> tree, the Tcl wrappers are regenerated and recompiled for Rendering,<br>
> VolumeRendering, Hybrid, Parallel, Widgets, Infovis, Views,<br>
> Charts/Geovis.<br>
><br>
> Does anybody has a clue?<br>
> Does anybody else have this issue?<br>
><br>
> PS: I'm using cmake 2.8.2<br>
><br>
> --<br>
> François Bertel, PhD | Kitware Inc. Suite 204<br>
> 1 (518) 371 3971 x113 | 28 Corporate Drive<br>
> | Clifton Park NY 12065, USA<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br></div>