[cfe-dev] [LLVMdev] Ninja build available for Visual Studio users

David Cole david.cole at kitware.com
Wed Jun 13 14:34:30 PDT 2012

On Wed, Jun 13, 2012 at 5:09 PM, =?utf-8?Q?=C3=93scar_Fuentes?= <
ofv at wanadoo.es> wrote:

> Nikola Smiljanic <popizdeh at gmail.com> writes:
> > Could somebody please provide more info. What exactly is ninja (I'm
> > guessing it's a build system) and how to set it up in combination with
> > Visual Studio?
> This is the message I posted on the LLVM mailing list. Here it goes
> again for the benefit of CLang'ers:
> Building LLVM with Visual Studio is a bit of a pain because the
> available methods are slow and doesn't make good use of multiprocessor
> systems.
> >From now on it is possible to build LLVM+Clang with the usual cmake
> method but using Ninja, an ultra-fast tool that knows how to take
> advantage of the availabe execution threads. Ultra-fast is no
> exageration: with a warm cache, a no-op build of LLVM is done in less
> than half a second.
> Rigth now Ninja/VS support is activated on a cmake experimental build,
> with strong possibilities of making its way into the next official
> release. For now, you need to build the patched cmake+ninja yourselves
> or download the executables from
> http://sourceforge.net/projects/cmakescript/files/
> Download and install cmake-Ninja-2.8.8.*-win32-x86.exe, then download
> ninja.exe to the `bin' subdirectory of the place where you installed
> cmake. Then proceed to build LLVM:
> mkdir myLLVMbuildWithNinja
> cd myLLVMbuildWithNinja
> cmake -G Ninja -DCMAKE_BUILD_TYPE=Release path/to/llvm/source/root
> ninja
> (be sure to use the cmake you just installed, not the one you already
> had on the system)
> If you prefer to build cmake+ninja yourselves, read the thread
> http://news.gmane.org/find-root.php?group=gmane.comp.programming.tools.cmake.devel&article=3903
> (long, sorry) or ask on the cmake developer's mailing list for pointers,
> as right now the exact sources are a bit of a moving target. If you find
> bugs building LLVM or any other cmake-based project with ninja, please
> report them on cmake's developers mailing list, available through gmane:
> http://dir.gmane.org/gmane.comp.programming.tools.cmake.devel
> or via e-mail:
> http://www.cmake.org/mailman/listinfo/cmake-developers
> About ninja:
> http://martine.github.com/ninja/
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

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.


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.

David Cole
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120613/39dd8905/attachment.html>

More information about the cfe-dev mailing list