<div class="gmail_quote">On Wed, Jun 13, 2012 at 5:09 PM, =?utf-8?Q?=C3=93scar_Fuentes?= <span dir="ltr"><<a href="mailto:ofv@wanadoo.es" target="_blank">ofv@wanadoo.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">Nikola Smiljanic <<a href="mailto:popizdeh@gmail.com">popizdeh@gmail.com</a>> writes:<br>
<br>
> Could somebody please provide more info. What exactly is ninja (I'm<br>
> guessing it's a build system) and how to set it up in combination with<br>
> Visual Studio?<br>
<br>
</div></div>This is the message I posted on the LLVM mailing list. Here it goes<br>
again for the benefit of CLang'ers:<br>
<br>
Building LLVM with Visual Studio is a bit of a pain because the<br>
available methods are slow and doesn't make good use of multiprocessor<br>
systems.<br>
<br>
>From now on it is possible to build LLVM+Clang with the usual cmake<br>
method but using Ninja, an ultra-fast tool that knows how to take<br>
advantage of the availabe execution threads. Ultra-fast is no<br>
exageration: with a warm cache, a no-op build of LLVM is done in less<br>
than half a second.<br>
<br>
Rigth now Ninja/VS support is activated on a cmake experimental build,<br>
with strong possibilities of making its way into the next official<br>
release. For now, you need to build the patched cmake+ninja yourselves<br>
or download the executables from<br>
<br>
<a href="http://sourceforge.net/projects/cmakescript/files/" target="_blank">http://sourceforge.net/projects/cmakescript/files/</a><br>
<br>
Download and install cmake-Ninja-2.8.8.*-win32-x86.exe, then download<br>
ninja.exe to the `bin' subdirectory of the place where you installed<br>
cmake. Then proceed to build LLVM:<br>
<br>
mkdir myLLVMbuildWithNinja<br>
cd myLLVMbuildWithNinja<br>
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release path/to/llvm/source/root<br>
ninja<br>
<br>
(be sure to use the cmake you just installed, not the one you already<br>
had on the system)<br>
<br>
If you prefer to build cmake+ninja yourselves, read the thread<br>
<br>
<a href="http://news.gmane.org/find-root.php?group=gmane.comp.programming.tools.cmake.devel&article=3903" target="_blank">http://news.gmane.org/find-root.php?group=gmane.comp.programming.tools.cmake.devel&article=3903</a><br>
<br>
(long, sorry) or ask on the cmake developer's mailing list for pointers,<br>
as right now the exact sources are a bit of a moving target. If you find<br>
bugs building LLVM or any other cmake-based project with ninja, please<br>
report them on cmake's developers mailing list, available through gmane:<br>
<br>
<a href="http://dir.gmane.org/gmane.comp.programming.tools.cmake.devel" target="_blank">http://dir.gmane.org/gmane.comp.programming.tools.cmake.devel</a><br>
<br>
or via e-mail:<br>
<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake-developers" target="_blank">http://www.cmake.org/mailman/listinfo/cmake-developers</a><br>
<br>
About ninja:<br>
<br>
<a href="http://martine.github.com/ninja/" target="_blank">http://martine.github.com/ninja/</a><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br><div><br></div><div>Today was the first day that our Windows CMake dashboard using the Ninja generator had all of its tests passing. So.... I just committed code to CMake to turn on the Ninja generator by default in Windows builds of CMake.</div>
<div><br></div><div> <a href="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2077e98753a505490d16cba42af0e0cae04f2c36">http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2077e98753a505490d16cba42af0e0cae04f2c36</a></div>
<div><br></div><div>The upcoming 2.8.9 release of CMake should have these recent changes in them to make it easy to build CMake based projects with ninja.</div><div><br></div><div><br></div><div>Thanks,</div><div>David Cole</div>
<div>Kitware, Inc.</div><div><br></div>