diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2023-01-06 11:14:57 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2023-01-10 09:53:22 -0800 |
| commit | 1f90873844b5fd505bf804eb99e81b46f6aa0977 (patch) | |
| tree | 2baf560d06bca83402095531a1a225a436e62a30 | |
| parent | ded57707c8196eda2fcf7ea507e7e2b38f9a7d19 (diff) | |
| download | meson-1f90873844b5fd505bf804eb99e81b46f6aa0977.tar.gz | |
build: Add a get_path method to Executable
This is needed to make Executable Polymorphic with ExternalProgram. This
can happen when a build program overrides a lookup.
| -rw-r--r-- | mesonbuild/build.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 960101fbf..a2ebb029d 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1909,6 +1909,11 @@ class Executable(BuildTarget): """ return self.outputs + def get_path(self) -> str: + """Provides compatibility with ExternalProgram.""" + return os.path.join(self.subdir, self.filename) + + class StaticLibrary(BuildTarget): known_kwargs = known_stlib_kwargs |
