external_project: Log configure command

pull/8456/head
Xavier Claessens 4 years ago committed by Jussi Pakkanen
parent f8681b12e1
commit 05ab792d58
  1. 4
      mesonbuild/modules/unstable_external_project.py

@ -162,10 +162,14 @@ class ExternalProject(InterpreterObject):
def _run(self, step: str, command: T.List[str]):
mlog.log('External project {}:'.format(self.name), mlog.bold(step))
m = 'Running command: ' + str(command)
log_filename = Path(mlog.log_dir, '{}-{}.log'.format(self.name, step))
output = None
if not self.verbose:
output = open(log_filename, 'w')
output.write(m + '\n')
else:
mlog.log(m)
p, o, e = Popen_safe(command, cwd=str(self.build_dir), env=self.run_env,
stderr=subprocess.STDOUT,
stdout=output)

Loading…
Cancel
Save