aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-07-17 16:48:37 +0200
committerGitHub <noreply@github.com>2017-07-17 16:48:37 +0200
commitaab7ada356e02033e4030143cf363d06d975283b (patch)
tree89cc10655d57affed97b0830d0cd7dc18c033191 /mesonbuild/environment.py
parente1b24765afd9e7d2d8043a408d69c7ad814d3551 (diff)
parentbbebd09f8bdc0164166b147e95798e9c35e07fb0 (diff)
downloadmeson-aab7ada356e02033e4030143cf363d06d975283b.zip
meson-aab7ada356e02033e4030143cf363d06d975283b.tar.gz
meson-aab7ada356e02033e4030143cf363d06d975283b.tar.bz2
Merge pull request #1931 from centricular/use-patched-ninja
CI: Use QuLogic's Ninja patches
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index b0002a0..b3d72e6 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -89,16 +89,19 @@ def find_coverage_tools():
genhtml_exe = None
return gcovr_exe, lcov_exe, genhtml_exe
-def detect_ninja(version='1.5'):
+def detect_ninja(version='1.5', log=False):
for n in ['ninja', 'ninja-build']:
try:
p, found = Popen_safe([n, '--version'])[0:2]
except (FileNotFoundError, PermissionError):
# Doesn't exist in PATH or isn't executable
continue
+ found = found.strip()
# Perhaps we should add a way for the caller to know the failure mode
# (not found or too old)
if p.returncode == 0 and mesonlib.version_compare(found, '>=' + version):
+ if log:
+ mlog.log('Found ninja-{} at {}'.format(found, shlex.quote(shutil.which(n))))
return n
def detect_native_windows_arch():