# How to find/manage Ninja?

**URL:** https://discourse.cmake.org/t/how-to-find-manage-ninja/2518
**Category:** Usage
**Tags:** gen:ninja
**Created:** [January 12, 2021, 3:53pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518 "2021-01-12T15:53:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ymba9g8j9cjp0wloqf5y/32/1244_2.png) [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)
#### Post date: [January 12, 2021, 3:53pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518/1 "2021-01-12T15:53:34Z")

</div>

I’m confused how I should find/manage Ninja.

The easiest solution I have found is to simply add Ninja to my PATH.

1. What are the alternatives to simply adding Ninja to my PATH? I don’t really like the idea of developers having to modify their path.
2. How should I enforce a specific version of Ninja? (EX 1.10.2)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [January 12, 2021, 4:05pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518/2 "2021-01-12T16:05:18Z")

</div>

> [@YMba9g8j9CJp0wLoQf5y](#):
>
> What are the alternatives to simply adding Ninja to my PATH? I don’t really like the idea of developers having to modify their path.

Pass `-DCMAKE_MAKE_PROGRAM=/full/path/to/ninja` should work.

> [@YMba9g8j9CJp0wLoQf5y](#):
>
> How should I enforce a specific version of Ninja? (EX 1.10.2)

You’d have to detect this yourself. Note that there are other ninja-compatible tools (`shake` comes to mind).

---

<div class="post-metadata">

### Author: ![YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ymba9g8j9cjp0wloqf5y/32/1244_2.png) [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)
#### Post date: [January 12, 2021, 5:17pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518/3 "2021-01-12T17:17:11Z")

</div>

I’ve never heard of shake before! What is it and can I use it with cmake?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [January 12, 2021, 5:40pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518/4 "2021-01-12T17:40:38Z")

</div>

It is one of a number of tools that can consume a `build.ninja`. As far as CMake is concerned, it is just another consumer of the `Ninja` generator.

---

<div class="post-metadata">

### Author: ![YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ymba9g8j9cjp0wloqf5y/32/1244_2.png) [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)
#### Post date: [January 12, 2021, 5:51pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518/5 "2021-01-12T17:51:15Z")

</div>

Wow I was never aware of this! Thank you for pointing it out!

Are you referring to this project?

> **[ndmitchell/shake](https://github.com/ndmitchell/shake)**
>
> Shake build system. Contribute to ndmitchell/shake development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [January 12, 2021, 6:50pm UTC](https://discourse.cmake.org/t/how-to-find-manage-ninja/2518/6 "2021-01-12T18:50:21Z")

</div>

Yep, that looks like it.
