summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-23 09:38:19 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-23 08:07:54 +0000
commitf745ef0f678b42c7a350d0b427ddafeab4d38451 (patch)
tree8a5c8a5f59e7162b9a48fea899ec511954e97b3c
parent61fa61ec164a57265c4d65d9292428f0050454a1 (diff)
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 <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rwxr-xr-xutil/cmake/pro2cmake.py6
1 files 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)