aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/introspection.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-01-30 16:16:08 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-31 15:43:04 +0100
commit8224ecfbe6e1811680113740341a277407904eb9 (patch)
treeba7bb8e00f088cf7b60970485d88d2c7bb895749 /mesonbuild/ast/introspection.py
parent4bfe0a25681f1abb8710aba1a89220dc328ee589 (diff)
downloadmeson-8224ecfbe6e1811680113740341a277407904eb9.zip
meson-8224ecfbe6e1811680113740341a277407904eb9.tar.gz
meson-8224ecfbe6e1811680113740341a277407904eb9.tar.bz2
Some fixes and assignment based target find
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r--mesonbuild/ast/introspection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index 5d0ec5a..0a4d73a 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -51,6 +51,7 @@ class IntrospectionInterpreter(AstInterpreter):
self.default_options = {'backend': self.backend}
self.project_data = {}
self.targets = []
+ self.project_node = None
self.funcs.update({
'add_languages': self.func_add_languages,
@@ -65,6 +66,9 @@ class IntrospectionInterpreter(AstInterpreter):
})
def func_project(self, node, args, kwargs):
+ if self.project_node:
+ raise InvalidArguments('Second call to project()')
+ self.project_node = node
if len(args) < 1:
raise InvalidArguments('Not enough arguments to project(). Needs at least the project name.')