From e9f4d4f1edf75fb94da18faa70c9a8fabe1f4e56 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 22 Dec 2015 14:59:44 -0200 Subject: [PATCH] waf: use better and simpler syntax to find program We can pass a list of possible binaries to find_program. This gives us a better output while configuring: Checking for program 'ninja, ninja-build' : /usr/bin/ninja-build instead of: Checking for program 'ninja' : not found Checking for program 'ninja-build' : /usr/bin/ninja-build --- Tools/ardupilotwaf/gbenchmark.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Tools/ardupilotwaf/gbenchmark.py b/Tools/ardupilotwaf/gbenchmark.py index 8946b4e87f..7b49052c31 100644 --- a/Tools/ardupilotwaf/gbenchmark.py +++ b/Tools/ardupilotwaf/gbenchmark.py @@ -26,10 +26,7 @@ def configure(cfg): env.GBENCHMARK_CMAKE_GENERATOR = None - cfg.find_program('ninja', mandatory=False) - if not env.NINJA: - cfg.find_program('ninja-build', var='NINJA', mandatory=False) - + cfg.find_program(['ninja', 'ninja-build'], var='NINJA', mandatory=False) if env.NINJA: env.GBENCHMARK_CMAKE_GENERATOR = 'Ninja'