CMake: pro2cmake.py: Add scope debugging support
Dump scope trees for all scopes that contain a variable 'PRO2CMAKE_SCOPE_DEBUG' (set to any value). Change-Id: If17bb1697a32ccaa427a858c2330ab2b019d0fa8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
cfbb110abe
commit
6dd989fe61
@ -272,6 +272,10 @@ class Scope(object):
|
||||
def merge_debug(self) -> bool:
|
||||
return self.getString('PRO2CMAKE_MERGE_DEBUG', None) != None
|
||||
|
||||
@property
|
||||
def scope_debug(self) -> bool:
|
||||
return self.getString('PRO2CMAKE_SCOPE_DEBUG', None) != None
|
||||
|
||||
@property
|
||||
def parent(self) -> typing.Optional[Scope]:
|
||||
return self._parent
|
||||
@ -351,6 +355,10 @@ class Scope(object):
|
||||
scope.currentdir)))
|
||||
continue
|
||||
|
||||
if scope.scope_debug:
|
||||
print('..... [SCOPE_DEBUG]: Created scope {}:'.format(scope))
|
||||
scope.dump(indent=1)
|
||||
print('..... [SCOPE_DEBUG]: <<END OF SCOPE>>')
|
||||
return scope
|
||||
|
||||
def _append_operation(self, key: str, op: Operation) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user