diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-06-06 10:06:30 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-06-17 14:23:19 +0200 |
| commit | ab60f6e4c489ace089785c002d75018ac6a31e30 (patch) | |
| tree | 91053ec752d9aa56df8061ba5e62c13431804a6b /src/lib/buildgraph/rulesapplicator.cpp | |
| parent | d3877c67d060d454ac66fde7b6ad41a2bb50d808 (diff) | |
| download | qbs-ab60f6e4c489ace089785c002d75018ac6a31e30.tar.gz | |
Allow projects to be nested.
This is nice to have for grouping products and
a requirement for aggregating existing projects
into a bigger one.
Change-Id: I3394642e95ea57dbc6bf1603cfed6902a5906e4c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/rulesapplicator.cpp')
| -rw-r--r-- | src/lib/buildgraph/rulesapplicator.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/buildgraph/rulesapplicator.cpp b/src/lib/buildgraph/rulesapplicator.cpp index 96054c328..11405a716 100644 --- a/src/lib/buildgraph/rulesapplicator.cpp +++ b/src/lib/buildgraph/rulesapplicator.cpp @@ -59,7 +59,7 @@ RulesApplicator::RulesApplicator(const ResolvedProductPtr &product, void RulesApplicator::applyAllRules() { - RulesEvaluationContext::Scope s(m_product->project->buildData->evaluationContext.data()); + RulesEvaluationContext::Scope s(m_product->topLevelProject()->buildData->evaluationContext.data()); foreach (const RuleConstPtr &rule, m_product->topSortedRules()) applyRule(rule); } @@ -147,7 +147,8 @@ void RulesApplicator::doApply(const ArtifactList &inputArtifacts) } m_transformer->outputs.insert(outputArtifact); - m_product->project->buildData->artifactsThatMustGetNewTransformers -= outputArtifact; + m_product->topLevelProject()->buildData->artifactsThatMustGetNewTransformers + -= outputArtifact; } m_transformer->setupInputs(engine(), scope()); @@ -199,7 +200,7 @@ void RulesApplicator::setupScriptEngineForArtifact(Artifact *artifact) QDir sourceDir(m_product->sourceDirectory); basedir = FileInfo::path(sourceDir.relativeFilePath(artifact->filePath())); } else { - QDir buildDir(m_product->project->buildDirectory); + QDir buildDir(m_product->topLevelProject()->buildDirectory); basedir = FileInfo::path(buildDir.relativeFilePath(artifact->filePath())); } @@ -303,7 +304,7 @@ Artifact *RulesApplicator::createOutputArtifact(const RuleArtifactConstPtr &rule QString RulesApplicator::resolveOutPath(const QString &path) const { - QString buildDir = m_product->project->buildDirectory; + QString buildDir = m_product->topLevelProject()->buildDirectory; QString result = FileInfo::resolvePath(buildDir, path); result = QDir::cleanPath(result); return result; @@ -311,7 +312,7 @@ QString RulesApplicator::resolveOutPath(const QString &path) const RulesEvaluationContextPtr RulesApplicator::evalContext() const { - return m_product->project->buildData->evaluationContext; + return m_product->topLevelProject()->buildData->evaluationContext; } ScriptEngine *RulesApplicator::engine() const |
