build: Add a get_command method to Executable

Since Executable can be used in places where ExternalProgram is, simply
having a wrapper that gives them the same API is pretty useful.
pull/9506/head
Dylan Baker 3 years ago
parent eafed4b8ad
commit b572a7980e
  1. 7
      mesonbuild/build.py

@ -1857,6 +1857,13 @@ class Executable(BuildTarget):
def is_linkable_target(self):
return self.is_linkwithable
def get_command(self) -> 'ImmutableListProtocol[str]':
"""Provides compatibility with ExternalProgram.
Since you can override ExternalProgram instances with Executables.
"""
return self.outputs
class StaticLibrary(BuildTarget):
known_kwargs = known_stlib_kwargs

Loading…
Cancel
Save