More version information for C#

This commit is contained in:
Christoph Behle 2017-12-16 15:05:09 +01:00
parent c6acf75617
commit 783263b9f4
2 changed files with 4 additions and 3 deletions

View File

@ -19,9 +19,9 @@ from ..mesonlib import EnvironmentException
from .compilers import Compiler, mono_buildtype_args
class MonoCompiler(Compiler):
def __init__(self, exelist, version):
def __init__(self, exelist, version, **kwargs):
self.language = 'cs'
super().__init__(exelist, version)
super().__init__(exelist, version, **kwargs)
self.id = 'mono'
self.monorunner = 'mono'

View File

@ -666,8 +666,9 @@ class Environment:
except OSError:
raise EnvironmentException('Could not execute C# compiler "%s"' % ' '.join(exelist))
version = search_version(out)
full_version = out.split('\n', 1)[0]
if 'Mono' in out:
return MonoCompiler(exelist, version)
return MonoCompiler(exelist, version, full_version=full_version)
raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')
def detect_vala_compiler(self):