On Wed, Mar 14, 2012 at 10:45:39AM -0400, Bill Hoffman wrote: > On 3/14/2012 7:34 AM, Nicolas Desprès wrote: >> 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. > What is the way to debug this? Can you get ninja to tell you why it is > choosing to do a build of a file? This is quite reproducible.
Most likely, this is due to the compile command line changing between runs. If any command line changes, Ninja will need to re-run that command. In particular, toggling CMAKE_ENABLE_NINJA would affect whether CMAKE_USE_NINJA is defined on the command line for anything under Source. Ninja stores previously run commands in .ninja_log so you can examine that to verify that the command line is changing. We can probably reduce the amount of recompilation required by only defining CMAKE_ENABLE_NINJA for cmake.cxx (the only source file that uses it). Thanks, -- Peter -- 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
