From 22dc78f41749d76df38ef1e17d6dc8c272d7cab0 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 13 Feb 2019 09:13:37 +0100 Subject: [PATCH] CMake: pro2cmake.py: Fix handling of TEMPLATE=subdir .pro-files Change-Id: I52f575df199c4d9b38123ab5d838f2e85344835d Reviewed-by: Albert Astals Cid --- util/cmake/pro2cmake.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 60e7f433bf7..1d48d2ba58a 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -676,7 +676,6 @@ def map_condition(condition: str) -> str: def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *, indent: int = 0) -> None: - assert scope.TEMPLATE == 'subdirs' ind = ' ' * indent for sd in scope.get('SUBDIRS', []): full_sd = os.path.join(scope.basedir, sd) @@ -697,7 +696,7 @@ def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *, else: print(' XXXX: SUBDIR {} in {}: Not found.'.format(sd, scope)) - for c in scope.children(): + for c in scope.children: cond = c.condition if cond == 'else': cm_fh.write('\n{}else()\n'.format(ind))