diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-18 18:19:55 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-09-18 18:40:24 +0300 |
commit | 7c2ae55fab2f0837531188373d276f168845e62f (patch) | |
tree | fe72c10b2da78e49add1c593512e1012d2f261df /mesonbuild/environment.py | |
parent | b9154dd07c357ba616deefb7a608e8b2ca85b7ec (diff) | |
download | meson-7c2ae55fab2f0837531188373d276f168845e62f.zip meson-7c2ae55fab2f0837531188373d276f168845e62f.tar.gz meson-7c2ae55fab2f0837531188373d276f168845e62f.tar.bz2 |
Revert "Revert "Merge pull request #1931 from centricular/use-patched-ninja""
This reverts commit 5eb64a6f3e47b570f544524ef48dc6ef0e4dce59.
Let's try again, with a fixed Ninja by QuLogic.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 0b2a159..2f33a03 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -90,16 +90,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(): |