How to find/manage Ninja?

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)

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

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

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

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

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

Are you referring to this project?

Yep, that looks like it.