aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--mesonbuild/environment.py6
-rwxr-xr-xrun_project_tests.py3
3 files changed, 6 insertions, 5 deletions
diff --git a/README.md b/README.md
index 645dd97..e3c1254 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ build system.
####Dependencies
- [Python](http://python.org) (version 3.4 or newer)
- - [Ninja](https://ninja-build.org)
+ - [Ninja](https://ninja-build.org) (version 1.5 or newer)
####Installing from source
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 48f5865..e4a55b3 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -36,16 +36,16 @@ def find_coverage_tools():
genhtml_exe = None
return (gcovr_exe, lcov_exe, genhtml_exe)
-def detect_ninja():
+def detect_ninja(version='1.5'):
for n in ['ninja', 'ninja-build']:
try:
- p, version = Popen_safe([n, '--version'])[0:2]
+ p, found = Popen_safe([n, '--version'])[0:2]
except (FileNotFoundError, PermissionError):
# Doesn't exist in PATH or isn't executable
continue
# 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(version, ">=1.6"):
+ if p.returncode == 0 and mesonlib.version_compare(found, '>=' + version):
return n
def detect_native_windows_arch():
diff --git a/run_project_tests.py b/run_project_tests.py
index 18988fb..2834254 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -112,7 +112,8 @@ def setup_commands(backend):
test_commands = ['xcodebuild', '-target', 'RUN_TESTS']
else:
backend_flags = []
- ninja_command = environment.detect_ninja()
+ # We need at least 1.6 because of -w dupbuild=err
+ ninja_command = environment.detect_ninja(version='1.6')
if ninja_command is None:
raise RuntimeError('Could not find Ninja v1.6 or newer')
if do_debug: