From c9e827a6a187bed146cb76d1dd398739d27dd183 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 10 Aug 2021 11:36:42 -0700 Subject: build: Add a `name` property to CustomTargetIndex This is needed to make CustomTargetIndex polymorphic with Target derived classes, and is used in the build module. --- mesonbuild/build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index afe8526..9cba677 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2573,6 +2573,10 @@ class CustomTargetIndex(HoldableObject): self.output = output self.for_machine = target.for_machine + @property + def name(self) -> str: + return f'{self.target.name}[{self.output}]' + def __repr__(self): return ''.format( self.target, self.target.get_outputs().index(self.output)) -- cgit v1.1