aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/rulesapplicator.h
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-04-27 17:47:51 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-05-09 12:55:51 +0000
commit92d532d88d7962d4568554d3f2928fd3d1d259d7 (patch)
treec2d73ef2162f7700765a40ba04e63e29c9dfb8f0 /src/lib/corelib/buildgraph/rulesapplicator.h
parentfb371a811d5f8de4ed78dd7b7a625b30e3e25996 (diff)
Add new property explicitlyDependsOnFromDependencies
This change adds new Rule item property called explicitlyDependsOnFromDependencies. It allows specifying a list of file tags to consider in dependent target artifacts which should be used as dependencies. [ChangeLog] The Rule item property explicitlyDependsOn no longer considers target artifacts of products that the processed product depends on. The new property explicitlyDependsOnFromDependencies can be used for that purpose. Change-Id: I47a80699fe881d4075b292ad164dd6e776049a83 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/rulesapplicator.h')
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.h b/src/lib/corelib/buildgraph/rulesapplicator.h
index ac4501491..76220f52d 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.h
+++ b/src/lib/corelib/buildgraph/rulesapplicator.h
@@ -46,6 +46,7 @@
#include <language/forward_decls.h>
#include <logging/logger.h>
+#include <QtCore/qflags.h>
#include <QtCore/qhash.h>
#include <QtCore/qstring.h>
#include <QtScript/qscriptvalue.h>
@@ -75,10 +76,14 @@ public:
const ArtifactSet &artifactsToRemove, const Logger &logger);
static ArtifactSet collectAuxiliaryInputs(const Rule *rule, const ResolvedProduct *product);
+ enum InputsSourceFlag { CurrentProduct, Dependencies };
+ Q_DECLARE_FLAGS(InputsSources, InputsSourceFlag)
+
private:
void doApply(const ArtifactSet &inputArtifacts, QScriptValue &prepareScriptContext);
ArtifactSet collectOldOutputArtifacts(const ArtifactSet &inputArtifacts) const;
ArtifactSet collectExplicitlyDependsOn();
+ ArtifactSet collectExplicitlyDependsOnFromDependencies();
Artifact *createOutputArtifactFromRuleArtifact(const RuleArtifactConstPtr &ruleArtifact,
const ArtifactSet &inputArtifacts, Set<QString> *outputFilePaths);
Artifact *createOutputArtifact(const QString &filePath, const FileTags &fileTags,
@@ -93,7 +98,8 @@ private:
QScriptValue scope() const;
static ArtifactSet collectAdditionalInputs(const FileTags &tags,
- const Rule *rule, const ResolvedProduct *product);
+ const Rule *rule, const ResolvedProduct *product,
+ InputsSources inputsSources);
const ResolvedProductPtr m_product;
const std::unordered_map<QString, const ResolvedProduct *> &m_productsByName;
@@ -108,6 +114,8 @@ private:
Logger m_logger;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(RulesApplicator::InputsSources)
+
} // namespace Internal
} // namespace qbs