diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-07-03 10:23:32 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-07-04 09:54:10 +0000 |
commit | d0e8197bbfb7d2bd33b957a9965fcc5d9b0982a6 (patch) | |
tree | 850f2cea1fc631054ec8a3b8c5d555b58a6d3de0 /src/lib/corelib/buildgraph/transformer.cpp | |
parent | 5b2b5498c6ee135bd1a8eb39fa96cfe28461234e (diff) |
Give rules access to artifacts matching "explicitlyDependsOn"
If outputs "explicitly depend on" other artifacts, then it is very
likely that these are needed in the prepare script and/or the command.
In fact, such artifacts are almost like inputs, except that they are
always passed the same way, regardless of whether we have a multiplex
rule or not.
[ChangeLog] Artifacts corresponding to the "explicitlyDependsOn" property
are now available under this name in rules and commands.
Change-Id: I28e41c29e250cccb1a64e83152528c28f48d5703
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/transformer.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/transformer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp index 147c61aff..ed9740681 100644 --- a/src/lib/corelib/buildgraph/transformer.cpp +++ b/src/lib/corelib/buildgraph/transformer.cpp @@ -200,6 +200,14 @@ void Transformer::setupOutputs(ScriptEngine *scriptEngine, QScriptValue targetSc targetScriptValue.setProperty(QLatin1String("output"), outputScriptValue); } +void Transformer::setupExplicitlyDependsOn(QScriptValue targetScriptValue) +{ + ScriptEngine * const scriptEngine = static_cast<ScriptEngine *>(targetScriptValue.engine()); + QScriptValue scriptValue = translateInOutputs(scriptEngine, explicitlyDependsOn, + rule->module->name); + targetScriptValue.setProperty(QLatin1String("explicitlyDependsOn"), scriptValue); +} + static AbstractCommandPtr createCommandFromScriptValue(const QScriptValue &scriptValue, const CodeLocation &codeLocation) { @@ -256,6 +264,7 @@ void Transformer::load(PersistentPool &pool) pool.load(rule); pool.load(inputs); pool.load(outputs); + pool.load(explicitlyDependsOn); pool.load(propertiesRequestedInPrepareScript); pool.load(propertiesRequestedInCommands); pool.load(propertiesRequestedFromArtifactInPrepareScript); @@ -269,6 +278,7 @@ void Transformer::store(PersistentPool &pool) const pool.store(rule); pool.store(inputs); pool.store(outputs); + pool.store(explicitlyDependsOn); pool.store(propertiesRequestedInPrepareScript); pool.store(propertiesRequestedInCommands); pool.store(propertiesRequestedFromArtifactInPrepareScript); |