On Wed, Mar 14, 2012 at 12:22 AM, Bill Hoffman <[email protected]> wrote:
> It seems that if the CMakeCache.txt changes, and cmake re-runs, ninja
> rebuilds almost ever single .obj file.  For example, if I turn on and off
> CMAKE_ENABLE_NINJA,   Then it rebuilds all the .obj files instead of
> relinking just a few executables since the .obj files are there all ready.
>  I had a report of this from someone else at Kitware working on a larger
> project.   They said if they changed options with ccmake, that ninja rebuild
> the whole thing.
>
> Is there a way to debug ninja and have it print out why it is building
> something?
>
>
> Here is the example:
>
> $ ninja
> [1/1] Re-running CMake...
> -- Enable ninja generator.
> -- Found Qt4:
> C:/Users/hoffman/Work/qt-everywhere-opensource-src-4.7.4/bin/qmake.exe
> (found suitable version "4.7.4", required is "4.4.0")
> -- Found Qt4:
> C:/Users/hoffman/Work/qt-everywhere-opensource-src-4.7.4/bin/qmake.exe
> (found version "4.7.4")
> -- No CTest.UpdateCVS test with cygwin cvs.exe outside cygwin!
> -- Configuring done
> -- Generating done
> -- Build files have been written to: C:/Users/hoffman/Work/My
> Builds/cmake-ninja
> [1/206] Building CXX object
> Source\CMakeFiles\CMakeLib.dir\cmGlobalVisualStudio7[2/206] Building CXX
> object Source\CMakeFiles\CMakeLib.dir\cmGlobalVisualStudio7
>
> This should be an almost no-op.   Is it because everything depends on the
> build.ninja file?

Nope if you like in the generated build.ninja "build.ninja" appears
only once as an output using the RERUN_CMAKE rule.

I rather think it is a bug in ninja of the restat implementation.

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to