From f745ef0f678b42c7a350d0b427ddafeab4d38451 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 23 Oct 2019 09:38:19 +0200 Subject: [PATCH] cmake scripts: do not override local target through includes This is needed for tests/auto/gui/kernel/qguiapplication which includes the qcoreapplication test. Without this change, the target name is taken from the included .pro file, instead of from the current file. Change-Id: I2d8a207fd70a49ad956fb9a83a59811d89682082 Reviewed-by: Leander Beernaert Reviewed-by: Simon Hausmann --- util/cmake/pro2cmake.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 833a3e58bd..e9492f7484 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -992,16 +992,16 @@ class Scope(object): def op_transformer(files): return files + for ic in self._included_children: + result = list(ic._evalOps(key, transformer, result)) + for op in self._operations.get(key, []): result = op.process(key, result, op_transformer) - for ic in self._included_children: - result = list(ic._evalOps(key, transformer, result)) return result def get(self, key: str, *, ignore_includes: bool = False, inherit: bool = False) -> List[str]: - is_same_path = self.currentdir == self.basedir if not is_same_path: relative_path = os.path.relpath(self.currentdir, self.basedir)