CMake: pro2cmake.py: Better representation of scopes as str

Include the current directory in the scope __repr__ output to make
it easier to understand where things wrt. include or file names go
wrong.

Change-Id: I09a6c17c6d8d547f1f64801bcde3c2e10c925ee1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tobias Hunger 2019-04-08 11:28:49 +02:00
parent 77a465ea2d
commit 52f676bf66

View File

@ -301,8 +301,10 @@ class Scope(object):
def __repr__(self):
debug_mark = ' [MERGE_DEBUG]' if self.merge_debug else ''
return '{}:{}:{}:{}{}'.format(self._scope_id, self._basedir, self._file,
self._condition or '<NONE>', debug_mark)
return '{}:{}:{}:{}:{}'.format(self._scope_id,
self._basedir, self._currentdir,
self._file, self._condition or '<TRUE>',
debug_mark)
def reset_visited_keys(self):
self._visited_keys = set()