aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-08-21 13:22:19 +0300
committerGitHub <noreply@github.com>2016-08-21 13:22:19 +0300
commit399d65380394556ba5cd1c2a3b364f891d095bfe (patch)
tree39192e313c0108ef43bef8ae2331ffe8b08dc8ce /mesonbuild/interpreter.py
parent5a926172e6e7870574585b5fe742fcf3e48b4398 (diff)
parent309f7a1b4a7179f44f53b75736b7cd6030f9f40d (diff)
downloadmeson-399d65380394556ba5cd1c2a3b364f891d095bfe.zip
meson-399d65380394556ba5cd1c2a3b364f891d095bfe.tar.gz
meson-399d65380394556ba5cd1c2a3b364f891d095bfe.tar.bz2
Merge pull request #685 from ximion/master
Implement D support
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 8645b68..f9841bd 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -597,6 +597,7 @@ class CompilerHolder(InterpreterObject):
'find_library': self.find_library_method,
'has_argument' : self.has_argument_method,
'first_supported_argument' : self.first_supported_argument_method,
+ 'unittest_args' : self.unittest_args_method,
})
def version_method(self, args, kwargs):
@@ -650,6 +651,12 @@ class CompilerHolder(InterpreterObject):
def get_id_method(self, args, kwargs):
return self.compiler.get_id()
+ def unittest_args_method(self, args, kwargs):
+ # At time, only D compilers have this feature.
+ if not hasattr(self.compiler, 'get_unittest_args'):
+ raise InterpreterException('This {} compiler has no unittest arguments.'.format(self.compiler.language))
+ return self.compiler.get_unittest_args()
+
def has_member_method(self, args, kwargs):
if len(args) != 2:
raise InterpreterException('Has_member takes exactly two arguments.')
@@ -1566,6 +1573,10 @@ class Interpreter():
comp = self.environment.detect_vala_compiler()
if need_cross_compiler:
cross_comp = comp # Vala is too (I think).
+ elif lang == 'd':
+ comp = self.environment.detect_d_compiler()
+ if need_cross_compiler:
+ cross_comp = comp # D as well (AFAIK).
elif lang == 'rust':
comp = self.environment.detect_rust_compiler()
if need_cross_compiler: