Ninja
A small, fast build system.
Ninja is a small, fast build system intended to be the back-end for higher-level meta-build systems rather than written by hand. A Ninja build file is a flat list of build edges that map inputs to outputs through commands, with no included files, no variables beyond simple local substitutions, and no built-in rules — features that meta-builds need but that slow Ninja down are deliberately omitted.
Evan Martin developed Ninja while working on Chromium at Google. The Chromium build had grown to a point where re-running the make-based build to find that nothing needed rebuilding took many seconds; Ninja's design (a binary build log, parallel dependency scanning, dependency information embedded in compiler output) brought that null incremental build down to under a second. The Chrome browser project still uses Ninja as its underlying build engine.
CMake (since 2.8.11), Meson, and gn all generate Ninja files by default. KDE, GNOME, LLVM, and many large C/C++ projects build on Ninja today. The footprint is famously small — a few thousand lines of C++ and a tiny dependency graph — which keeps build- system bugs relatively rare and easy to diagnose.
Install
Debian/Ubuntu: sudo apt install ninja-build Fedora/RHEL: sudo dnf install ninja-build Arch: sudo pacman -S ninja macOS: brew install ninja
Authors
- Evan Martin (creator)
- Ninja contributors