diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-03-02 17:41:25 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-03-04 13:00:29 +0100 |
commit | e724fd5438a20836be1b270c1f851502ac97fdd4 (patch) | |
tree | f1daabd4671eafffa37555cb5705b2ad5e5f7772 /mesonbuild/ast/introspection.py | |
parent | ff5e7eb104d015c462fdae2de76c967bf00c27ad (diff) | |
download | meson-e724fd5438a20836be1b270c1f851502ac97fdd4.zip meson-e724fd5438a20836be1b270c1f851502ac97fdd4.tar.gz meson-e724fd5438a20836be1b270c1f851502ac97fdd4.tar.bz2 |
rewriter: Handle duplicate target
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r-- | mesonbuild/ast/introspection.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 12cb379..5745d29 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -194,7 +194,7 @@ class IntrospectionInterpreter(AstInterpreter): empty_sources = [] # Passing the unresolved sources list causes errors target = targetclass(name, self.subdir, self.subproject, is_cross, empty_sources, objects, self.environment, kwargs_reduced) - self.targets += [{ + new_target = { 'name': target.get_basename(), 'id': target.get_id(), 'type': target.get_typename(), @@ -206,9 +206,10 @@ class IntrospectionInterpreter(AstInterpreter): 'sources': source_nodes, 'kwargs': kwargs, 'node': node, - }] + } - return + self.targets += [new_target] + return new_target def build_library(self, node, args, kwargs): default_library = self.coredata.get_builtin_option('default_library') |