Ninja: Prefer first ninja tool available in PATH
The Ninja generator searches for a ninja build tool with one of the names ninja-build
, ninja
, or samu
. As of CMake 3.16, the first name ninja-build
will be preferred if it appears anywhere in PATH
even if another name like ninja
appears in a directory earlier in the PATH
. On systems whose package manager calls the tool ninja-build
, this makes it harder to use a plain ninja
tool from another location. Instead we should prefer whichever tool appears first in PATH
.