diff options
author | TheQwertiest <qwertiest@mail.ru> | 2020-05-26 16:53:34 +0300 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-05-26 13:45:03 -0400 |
commit | 4b6471f1d599c582754272d0046559d0b11869fa (patch) | |
tree | 3a08aae3c3ac170b226b29575a3e67adb004462d /mesonbuild/mcompile.py | |
parent | 7c2f9e2b57daca67d98dde163100112f47512bfc (diff) | |
download | meson-4b6471f1d599c582754272d0046559d0b11869fa.zip meson-4b6471f1d599c582754272d0046559d0b11869fa.tar.gz meson-4b6471f1d599c582754272d0046559d0b11869fa.tar.bz2 |
mcompile: detect_ninja
Diffstat (limited to 'mesonbuild/mcompile.py')
-rw-r--r-- | mesonbuild/mcompile.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index cc17871..51a5555 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -24,6 +24,7 @@ from . import mlog from . import mesonlib from . import coredata from .mesonlib import MesonException +from mesonbuild.environment import detect_ninja if T.TYPE_CHECKING: import argparse @@ -42,15 +43,9 @@ def get_backend_from_coredata(builddir: Path) -> str: return coredata.load(str(builddir)).get_builtin_option('backend') def get_parsed_args_ninja(options: 'argparse.Namespace', builddir: Path): - runner = os.environ.get('NINJA') - if not runner: - if shutil.which('ninja'): - runner = 'ninja' - elif shutil.which('samu'): - runner = 'samu' - + runner = detect_ninja() if runner is None: - raise MesonException('Cannot find either ninja or samu.') + raise MesonException('Cannot find ninja.') mlog.log('Found runner:', runner) cmd = [runner, '-C', builddir.as_posix()] |