[vtk-developers] Never "nothing to do" with a python-wrapped VTK build using ninja

Ben Boeckel ben.boeckel at kitware.com
Fri Oct 24 19:33:10 EDT 2014

On Fri, Oct 24, 2014 at 15:53:05 -0400, David Cole via vtk-developers wrote:
> Has anybody else noticed that this rule always runs, even on a
> presumably up to date build tree?
>     C:\dev\repos\My Tests\VTK Win64-ninja-cl11x64-Debug> ninja
>     [1/1] cmd.exe /C "cd /D "C:\dev\repos\My Tests\VTK
> Win64-ninja-cl11x64-Debug\Wrapping\Python" && echo ..."
>     ...
> I expect to see "nothing to do", but it always runs a seemingly silly
> little no-op custom command to echo "..."
> Does anybody see this with other build systems, or is it just me with
> my ninja build?
> (Using cmake 3.0.2, by the way)

This is fine, but could probably (but I haven't investigated too much)
be modified such that it doesn't need to be always run. Basically the
target is there to trigger that .pyc files are always up-to-date in the
build tree. Since proper dependencies cannot be computed for it (there's
no concept of "depends on all *.py files under inputdir/"), this is
currently used as a hack to chain *that* command into the main build.

When proper git hash detection lands in VTK (doing so during the build
rather than configure time), that will be another target that will
always be out of date preventing a "no work to do" state from ninja.
However, if things need to rebuild or relink every time, *that* would be
a bug.


More information about the vtk-developers mailing list