aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/moduleloader.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-04-26 17:16:15 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-06-04 07:56:53 +0000
commit400d9e1d66aacb2760b2190a5f10cfc3d5d359d2 (patch)
tree0c7ac294927572b38b268c3fe7d560dc652efa46 /src/lib/corelib/language/moduleloader.cpp
parent7a46541d7885b07cb80fab3b8ab861ae369e4438 (diff)
Make sure probe results are also cached for shadow products
Because we don't turn shadow products into actual products in the ProjectResolver, the results of probes run in their context did not end up in the build graph and the configure scripts were therefore needlessly re-executed on the next project resolving. Fix this by storing these probe results along with the project-level ones. Change-Id: I647bbedbbe3fa6f36b536fd1b80fd321894362f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/language/moduleloader.cpp')
-rw-r--r--src/lib/corelib/language/moduleloader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp
index 933c49abc..df47e36ea 100644
--- a/src/lib/corelib/language/moduleloader.cpp
+++ b/src/lib/corelib/language/moduleloader.cpp
@@ -581,6 +581,8 @@ void ModuleLoader::handleTopLevelProject(ModuleLoaderResult *loadResult, Item *p
for (ProductContext * const p : productSorter.sortedProducts()) {
try {
handleProduct(p);
+ if (p->name.startsWith(shadowProductPrefix()))
+ tlp.probes << p->info.probes;
} catch (const ErrorInfo &err) {
handleProductError(err, p);
}
@@ -3418,7 +3420,8 @@ void ModuleLoader::resolveProbe(ProductContext *productContext, Item *parent, It
const bool condition = m_evaluator->boolValue(probe, StringConstants::conditionProperty());
const QString &sourceCode = configureScript->sourceCode().toString();
ProbeConstPtr resolvedProbe;
- if (parent->type() == ItemType::Project) {
+ if (parent->type() == ItemType::Project
+ || productContext->name.startsWith(shadowProductPrefix())) {
resolvedProbe = findOldProjectProbe(probeId, condition, initialProperties, sourceCode);
} else {
const QString &uniqueProductName = productContext->uniqueName();