Skip to content
Ninja is a small build system with a focus on speed.
C++ Python C Objective-C Perl Shell Other
Find file
New pull request
Pull request Compare This branch is 127 commits ahead, 948 commits behind ninja-build:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Based on original version from

Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects:

  • it is designed to have its input files generated by a higher-level build system,
  • it is designed to run builds as fast as possible.


I have forked the orignal version to support MINGW, MSYS, and CYGWIN builds too.

Ninja should be usable on most platforms as cmake do!

Claus Klein

See the manual -- or doc/manual.asciidoc included in the distribution -- for background and more details.

Download the current Ninja source code as zip file from

Getting a source code version of Ninja with git to work with:

git clone git://
cd ninja
make ninja


To bootstrap Ninja and you have python istalled, run python ./ It first blindly compiles all non-test source files together, then re-builds Ninja using itself and ./ You should end up with a Ninja binary in the source root. Run ./ninja -h for help.

If you like to use cmake and make to bootstrap Ninja create a build dir and generate your build project:

mkdir -p build && cd build
cmake  .. && make
# or you have already ninja installed
cmake -G Ninja .. && ninja

You may also create a Mac OSX Package Maker installer with cpack:

cpack -C CPackConfig.cmake -G PackageMaker

On Windows you may want to create "Null Soft Installer":

cpack -C CPackConfig.cmake -G NSIS

The only file of interest to a user is the resulting Ninja binary.

You may install it yourself with:

sudo install ninja /usr/local/bin
# or
sudo make install


If you want to work with code, you should use git-flow . Fork my git repository. Then, run:

git clone --recursive<username>/ninja.git
git branch develop origin/develop
git flow init -d
git flow feature start <your feature>

Then, after develop and testing your work, commit your changes:

git flow feature publish <your feature>

When done, open a pull request to your feature branch.



Something went wrong with that request. Please try again.