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:
parent
6579277578
commit
e9f4d4f1ed
@ -26,10 +26,7 @@ def configure(cfg):
|
|||||||
|
|
||||||
env.GBENCHMARK_CMAKE_GENERATOR = None
|
env.GBENCHMARK_CMAKE_GENERATOR = None
|
||||||
|
|
||||||
cfg.find_program('ninja', mandatory=False)
|
cfg.find_program(['ninja', 'ninja-build'], var='NINJA', mandatory=False)
|
||||||
if not env.NINJA:
|
|
||||||
cfg.find_program('ninja-build', var='NINJA', mandatory=False)
|
|
||||||
|
|
||||||
if env.NINJA:
|
if env.NINJA:
|
||||||
env.GBENCHMARK_CMAKE_GENERATOR = 'Ninja'
|
env.GBENCHMARK_CMAKE_GENERATOR = 'Ninja'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user