aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorNiklas Claesson <nicke.claesson@gmail.com>2017-09-20 20:28:04 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-09-29 23:29:44 +0300
commit68275b32e80147145cc78607f496255486fb9d92 (patch)
treeceeac94f4cc545e341f2dbdbb0699d0ba51e46ae /mesonbuild/build.py
parentc93bce78397de6cc96f0ed57ec4b01b582415db0 (diff)
downloadmeson-68275b32e80147145cc78607f496255486fb9d92.zip
meson-68275b32e80147145cc78607f496255486fb9d92.tar.gz
meson-68275b32e80147145cc78607f496255486fb9d92.tar.bz2
Implement capture for generators
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index d3c0b54..8c02d1d 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1019,6 +1019,7 @@ class Generator:
raise InvalidArguments('First generator argument must be an executable.')
self.exe = exe
self.depfile = None
+ self.capture = False
self.process_kwargs(kwargs)
def __repr__(self):
@@ -1062,6 +1063,11 @@ class Generator:
if os.path.split(depfile)[1] != depfile:
raise InvalidArguments('Depfile must be a plain filename without a subdirectory.')
self.depfile = depfile
+ if 'capture' in kwargs:
+ capture = kwargs['capture']
+ if not isinstance(capture, bool):
+ raise InvalidArguments('Capture must be boolean.')
+ self.capture = capture
def get_base_outnames(self, inname):
plainname = os.path.split(inname)[1]