From c6acf75617a8c200f8c8cbe11c3342228842be05 Mon Sep 17 00:00:00 2001 From: Christoph Behle Date: Sat, 16 Dec 2017 14:52:08 +0100 Subject: More version information for compilers. See issue #2762 Adds full_version to class Compiler. If set full_version will be printed additionally. Added support for CCompiler and CPPCompiler Added support for gcc/g++, clang/clang++, icc. --- mesonbuild/compilers/compilers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers/compilers.py') diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 011c222..6941649 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -598,7 +598,7 @@ class Compiler: # compiler or the C library. Currently only used for MSVC. ignore_libs = () - def __init__(self, exelist, version): + def __init__(self, exelist, version, **kwargs): if isinstance(exelist, str): self.exelist = [exelist] elif isinstance(exelist, list): @@ -612,6 +612,10 @@ class Compiler: self.can_compile_suffixes = set(self.file_suffixes) self.default_suffix = self.file_suffixes[0] self.version = version + if 'full_version' in kwargs: + self.full_version = kwargs['full_version'] + else: + self.full_version = None self.base_options = [] def __repr__(self): -- cgit v1.1