msvcdeps: Tweak debug output

Print out which source file waf is gathering dependencies for and leave
the leading spaces in the dependency debug output because it can be
helpful to see the dependency hierarchy.
This commit is contained in:
Michael Vincent 2020-04-22 19:04:28 -05:00 committed by Thomas Nagy
parent 2a6817fa1c
commit d3c0017d21
1 changed files with 5 additions and 2 deletions

View File

@ -211,11 +211,14 @@ def exec_command(self, cmd, **kw):
# get one from the exception object
ret = getattr(e, 'returncode', 1)
Logs.debug('msvcdeps: Running for: %s' % self.inputs[0])
for line in raw_out.splitlines():
if line.startswith(INCLUDE_PATTERN):
inc_path = line[len(INCLUDE_PATTERN):].strip()
# Only strip whitespace after log to preserve
# dependency structure in debug output
inc_path = line[len(INCLUDE_PATTERN):]
Logs.debug('msvcdeps: Regex matched %s', inc_path)
self.msvcdeps_paths.append(inc_path)
self.msvcdeps_paths.append(inc_path.strip())
else:
out.append(line)