diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-09-21 15:56:01 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2019-04-12 11:47:28 +0100 |
commit | 3fc3695624f8929bc137a3e81558da2822c74784 (patch) | |
tree | 35bc33ebbb0af7c6d7a291920ba60ff503c6b23c /mesonbuild/compilers | |
parent | 0a0b473e840ccee3b3d1353902010bc84c2ca96f (diff) | |
download | meson-3fc3695624f8929bc137a3e81558da2822c74784.zip meson-3fc3695624f8929bc137a3e81558da2822c74784.tar.gz meson-3fc3695624f8929bc137a3e81558da2822c74784.tar.bz2 |
Push formatting of compiler version string down into Compiler class
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index e29ca55..ed158b6 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -914,6 +914,12 @@ class Compiler: def get_id(self): return self.id + def get_version_string(self): + details = [self.id, self.version] + if self.full_version: + details += ['"%s"' % (self.full_version)] + return '(%s)' % (' '.join(details)) + def get_language(self): return self.language |