build: fix types added in CustomTarget.get_target_dependencies

Because everything except ExternalProgram in CustomTarget.sources is a
valid dependency
pull/10473/head
Dylan Baker 3 years ago committed by Jussi Pakkanen
parent c621ab2251
commit c3ef52311a
  1. 6
      mesonbuild/build.py

@ -2491,10 +2491,10 @@ class CustomTarget(Target, CommandBase):
deps.extend(self.dependencies) deps.extend(self.dependencies)
deps.extend(self.extra_depends) deps.extend(self.extra_depends)
for c in self.sources: for c in self.sources:
if isinstance(c, (BuildTarget, CustomTarget)): if isinstance(c, CustomTargetIndex):
deps.append(c)
elif isinstance(c, CustomTargetIndex):
deps.append(c.target) deps.append(c.target)
elif not isinstance(c, programs.ExternalProgram):
deps.append(c)
return deps return deps
def get_transitive_build_target_deps(self) -> T.Set[T.Union[BuildTarget, 'CustomTarget']]: def get_transitive_build_target_deps(self) -> T.Set[T.Union[BuildTarget, 'CustomTarget']]:

Loading…
Cancel
Save