[cmake-developers] new ninja rebuild too much issue
Bill Hoffman
bill.hoffman at kitware.com
Tue Mar 13 19:22:25 EDT 2012
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?
-Bill
More information about the cmake-developers
mailing list