summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-26 16:13:02 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-26 16:20:15 (GMT)
commitfeb5cb8d9d9a334c34e8cc30c9970fd5d71d25fd (patch)
tree49d6a08ff9c7743217a1f061dad35f16b6496a40 /Modules
parentffe801062a63387b2c109eda034d74830d72a4ce (diff)
downloadCMake-feb5cb8d9d9a334c34e8cc30c9970fd5d71d25fd.zip
CMake-feb5cb8d9d9a334c34e8cc30c9970fd5d71d25fd.tar.gz
CMake-feb5cb8d9d9a334c34e8cc30c9970fd5d71d25fd.tar.bz2
Ninja: Prefer first ninja tool available in PATH
We search for tools `ninja-build`, `ninja`, and `samu` as the build tool for the Ninja generator. Re-order the search to prefer whichever tool appears first in the `PATH`. This makes it easier for users to control which tool gets used when more than one is available. Fixes: #20028
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeNinjaFindMake.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeNinjaFindMake.cmake b/Modules/CMakeNinjaFindMake.cmake
index 702af13..32f78da 100644
--- a/Modules/CMakeNinjaFindMake.cmake
+++ b/Modules/CMakeNinjaFindMake.cmake
@@ -4,5 +4,6 @@
find_program(CMAKE_MAKE_PROGRAM
NAMES ninja-build ninja samu
+ NAMES_PER_DIR
DOC "Program used to build from build.ninja files.")
mark_as_advanced(CMAKE_MAKE_PROGRAM)