aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-11-30 23:17:57 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2019-04-15 12:06:58 +0100
commit1e9b753c95cc78922c45578a4cbfc9c1b6ef416b (patch)
treeb27cced253da223027a5d3967918eb64cc3af3c3 /run_project_tests.py
parente5008b01094a555a249cfa8605db06ba9fc92349 (diff)
downloadmeson-1e9b753c95cc78922c45578a4cbfc9c1b6ef416b.zip
meson-1e9b753c95cc78922c45578a4cbfc9c1b6ef416b.tar.gz
meson-1e9b753c95cc78922c45578a4cbfc9c1b6ef416b.tar.bz2
Report detected compilers in run_project_tests
v2: Use compilers.all_languages for the list of known languages
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index fdb5f48..a20f474 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -27,6 +27,7 @@ import tempfile
from pathlib import Path, PurePath
from mesonbuild import build
from mesonbuild import environment
+from mesonbuild import compilers
from mesonbuild import mesonlib
from mesonbuild import mlog
from mesonbuild import mtest
@@ -768,11 +769,23 @@ def detect_system_compiler():
with AutoDeletedDir(tempfile.mkdtemp(prefix='b ', dir='.')) as build_dir:
env = environment.Environment(None, build_dir, get_fake_options('/'))
- try:
- comp = env.detect_c_compiler(env.is_cross_build())
- except:
- raise RuntimeError("Could not find C compiler.")
- system_compiler = comp.get_id()
+ print()
+ for lang in sorted(compilers.all_languages):
+ try:
+ comp = env.compiler_from_language(lang, env.is_cross_build())
+ details = '%s %s' % (' '.join(comp.get_exelist()), comp.get_version_string())
+ except:
+ comp = None
+ details = 'not found'
+ print('%-7s: %s' % (lang, details))
+
+ # note C compiler for later use by platform_fix_name()
+ if lang == 'c':
+ if comp:
+ system_compiler = comp.get_id()
+ else:
+ raise RuntimeError("Could not find C compiler.")
+ print()
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Run the test suite of Meson.")