No, I delete the entire build tree (I build out of the source tree, btw).<div><br></div><div>The procedure is as follows:</div><div><br></div><div> rem foo contains the source code</div><div> md foo-build</div><div> cd foo-build</div>
<div> cmake -G Ninja ..\foo</div><div> ninja</div><div> rem fails as described earlier</div><div><br></div><div> cd ..</div><div> rd /s /q foo-build</div><div> md foo-build</div><div> cd foo-build</div><div>
cmake -G "MinGW Makefiles" ..\foo</div><div> make</div><div> rem succeeds as described earlier</div><div><br></div><div>Thank you for your reply. If you need source, I can send you a zip archive as it is an incomplete open source project.</div>
<div><br></div><div><br></div><div>Cheers,</div><div>Mikael<br><br><div class="gmail_quote">2012/6/27 David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can't switch generators in the same build tree without deleting<br>
absolutely everything and starting over.<br>
<br>
Is that what you're trying to do?<br>
<br>
If you want a make build tree and a ninja build tree, you'll need two<br>
separate build trees....<br>
<br>
<br>
HTH,<br>
David<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, Jun 26, 2012 at 4:45 PM, Mikael Lyngvig <<a href="mailto:mikael@lyngvig.org">mikael@lyngvig.org</a>> wrote:<br>
> Hi,<br>
><br>
> I am a fan of Ninja. Since I started using it, everything's been built<br>
> much, much faster than before. Among other things because I use CMake to<br>
> publish headers to the binary directory so as to allow me to include the<br>
> headers with a relative path without having to move all my headers to a<br>
> central include directory (I want my source files and headers to be in the<br>
> same directory). Ninja does this very fast, whereas GNU Make takes forever<br>
> to publish my header files.<br>
><br>
> However, I have a puzzling problem: Out of the blue, Ninja started failing<br>
> to build my project. If I remake the project with 'cmake -G "MinGW<br>
> Makefiles"', it takes ages to build but it succeeds. If I do 'cmake -G<br>
> Ninja', it quickly aborts because it seems that either CMake or Ninja wants<br>
> to build one of the last targets at a very early point in the build phase.<br>
> I have an executable, driver.exe, which is supposed to be built as the very<br>
> last item. With Ninja, however, it pops up around 20 percent into the build<br>
> and the build fails because the dependent libraries are nowhere to be found<br>
> (they haven't been built yet). I have tried clearing the binaries directory<br>
> (rd /s /q foo & md foo) and so on a number of times, but Ninja insists on<br>
> trying to build this final executable at a very early stage.<br>
><br>
> Any ideas? I suppose the problem is caused by one of these three things:<br>
><br>
> 1. An error on my part. Very likely.<br>
> 2. An error in CMake's generation of Ninja scripts. Not unlikely due to<br>
> the still fairly immature support for Ninja.<br>
> 3. An error in Ninja. Highly unlikely as Ninja builds tons and tons of<br>
> projects all over the world each day and nobody seem to have run into this<br>
> problem before.<br>
><br>
> How do you locate the problem?<br>
><br>
> Thanks in advance!<br>
><br>
><br>
> Cheers,<br>
> Mikael<br>
> -- Love Thy Frog!<br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<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<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></span></blockquote></div><br>
</div>