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>
This commit is contained in:
Frederik Gladhorn 2019-10-23 09:38:19 +02:00
parent 61fa61ec16
commit f745ef0f67

View File

@ -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)