diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-31 15:57:02 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-31 15:57:02 +0100 |
commit | 8c364952af536cbf9271e76d74501091f2d6ae45 (patch) | |
tree | 4bfb52910c78840e4bd3845e62a55fc7b142646b /mesonbuild/ast/introspection.py | |
parent | 56558652460104cbc74a4f1fa328d3aa34eebf0c (diff) | |
download | meson-8c364952af536cbf9271e76d74501091f2d6ae45.zip meson-8c364952af536cbf9271e76d74501091f2d6ae45.tar.gz meson-8c364952af536cbf9271e76d74501091f2d6ae45.tar.bz2 |
Added dependecy kwargs support
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r-- | mesonbuild/ast/introspection.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 67a0fe7..44c00b7 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -51,10 +51,12 @@ class IntrospectionInterpreter(AstInterpreter): self.default_options = {'backend': self.backend} self.project_data = {} self.targets = [] + self.dependencies = [] self.project_node = None self.funcs.update({ 'add_languages': self.func_add_languages, + 'dependency': self.func_dependency, 'executable': self.func_executable, 'jar': self.func_jar, 'library': self.func_library, @@ -129,6 +131,16 @@ class IntrospectionInterpreter(AstInterpreter): if lang not in self.coredata.compilers: self.environment.detect_compilers(lang, need_cross_compiler) + def func_dependency(self, node, args, kwargs): + args = self.flatten_args(args) + if not args: + return + name = args[0] + self.dependencies += [{ + 'name': name, + 'node': node + }] + def build_target(self, node, args, kwargs, targetclass): if not args: return |