diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-09-18 20:23:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 20:23:56 +0300 |
commit | 076f3c53bd4d959448507eb904ed9d5890a6f121 (patch) | |
tree | 68ef3357b7cd46c4d5c6b94d0c3fdf2f3079c4b1 /mesonbuild/interpreter.py | |
parent | 0b0448f8f2b062355242c86bb59c2596789fd90f (diff) | |
parent | c3c37fac38dcea1f00cb6750722b39704ef8fc10 (diff) | |
download | meson-076f3c53bd4d959448507eb904ed9d5890a6f121.zip meson-076f3c53bd4d959448507eb904ed9d5890a6f121.tar.gz meson-076f3c53bd4d959448507eb904ed9d5890a6f121.tar.bz2 |
Merge pull request #2263 from ximion/dlang
d: Add an easy way to use D-specific features
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 2bcf198..9a1bb84 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -752,10 +752,13 @@ class CompilerHolder(InterpreterObject): return self.compiler.symbols_have_underscore_prefix(self.environment) 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.get_display_language())) - return self.compiler.get_unittest_args() + ''' + This function is deprecated and should not be used. + It can be removed in a future version of Meson. + ''' + if not hasattr(self.compiler, 'get_feature_args'): + raise InterpreterException('This {} compiler has no feature arguments.'.format(self.compiler.get_display_language())) + return self.compiler.get_feature_args({'unittest': 'true'}) def has_member_method(self, args, kwargs): if len(args) != 2: @@ -1249,6 +1252,9 @@ pch_kwargs = set(['c_pch', 'cpp_pch']) lang_arg_kwargs = set(['c_args', 'cpp_args', 'd_args', + 'd_import_dirs', + 'd_unittest', + 'd_module_versions', 'fortran_args', 'java_args', 'objc_args', |