aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-01-06 11:14:57 -0800
committerDylan Baker <dylan@pnwbakers.com>2023-01-10 09:53:22 -0800
commit1f90873844b5fd505bf804eb99e81b46f6aa0977 (patch)
tree2baf560d06bca83402095531a1a225a436e62a30 /mesonbuild
parentded57707c8196eda2fcf7ea507e7e2b38f9a7d19 (diff)
downloadmeson-1f90873844b5fd505bf804eb99e81b46f6aa0977.zip
meson-1f90873844b5fd505bf804eb99e81b46f6aa0977.tar.gz
meson-1f90873844b5fd505bf804eb99e81b46f6aa0977.tar.bz2
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.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/build.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 960101f..a2ebb02 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