diff options
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 99428c7..a1b46a8 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -141,6 +141,10 @@ def find_coverage_tools(): return gcovr_exe, gcovr_new_rootdir, lcov_exe, genhtml_exe def detect_ninja(version: str = '1.5', log: bool = False) -> str: + r = detect_ninja_command_and_version(version, log) + return r[0] if r else None + +def detect_ninja_command_and_version(version: str = '1.5', log: bool = False) -> (str, str): env_ninja = os.environ.get('NINJA', None) for n in [env_ninja] if env_ninja else ['ninja', 'ninja-build', 'samu']: try: @@ -162,7 +166,7 @@ def detect_ninja(version: str = '1.5', log: bool = False) -> str: if name == 'samu': name = 'samurai' mlog.log('Found {}-{} at {}'.format(name, found, quote_arg(n))) - return n + return (n, found) def get_llvm_tool_names(tool: str) -> typing.List[str]: # Ordered list of possible suffixes of LLVM executables to try. Start with |