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
This commit is contained in:
Lucas De Marchi 2015-12-22 14:59:44 -02:00
parent 6579277578
commit e9f4d4f1ed

View File

@ -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'