Speed up compile times on a large C++ project by switching from Make to Ninja as your build backend.
Use CMake to generate Ninja build files, then run fast incremental builds during development without waiting for full rebuilds.
Build Ninja from source using the included Python bootstrap script or CMake on Linux, Mac, or Windows.
Ninja is a build system: a tool that developers use to compile and assemble software projects. Its main design goal is speed. Build systems read a description of what needs to be compiled and in what order, then carry out those steps, ideally only rebuilding the parts that have actually changed since the last run. Ninja is intentionally small and simple. It does not aim to be a general-purpose scripting environment or a place to define complex project logic. Instead, it is typically used as the target output of a higher-level build generator. CMake, for example, can generate Ninja build files that Ninja then executes. This split means Ninja handles execution quickly while another tool handles the configuration complexity. The project is a single binary that runs on Linux, Mac, and Windows. Installation means placing that binary somewhere accessible, nothing more. Optional extras like shell tab completion and editor integrations for Emacs and Vim require copying a few files from the repository's misc directory. Building Ninja itself from source can be done two ways: a Python bootstrap script or CMake. The Python route generates the Ninja binary and a Ninja build file, which Ninja can then use to rebuild itself. The CMake route is straightforward for developers already using CMake. The README for this project is short and primarily directs readers to the full manual on the project website or the included documentation file for details on how to write Ninja build files and use Ninja's features.
← ninja-build on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.