diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-18 11:42:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-28 12:49:21 (GMT) |
commit | 7e807472d2b17d40c702ff91c7255eca04a64ebe (patch) | |
tree | 61dc894fc58d4ff8878947e2d50d4aea9618adfd /Source/cmGeneratorExpressionEvaluator.h | |
parent | 239ac841538be536e70cbddb2b04bef2b342a2e5 (diff) | |
download | CMake-7e807472d2b17d40c702ff91c7255eca04a64ebe.zip CMake-7e807472d2b17d40c702ff91c7255eca04a64ebe.tar.gz CMake-7e807472d2b17d40c702ff91c7255eca04a64ebe.tar.bz2 |
Add API to check that dependent target properties form a DAG.
Initially this will only be used to check for self-references, but
can be extended to check for cycles when chaining properties of other
targets.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.h')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 4086e8e..04a2acd 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -32,6 +32,8 @@ struct cmGeneratorExpressionContext bool HadError; }; +struct cmGeneratorExpressionDAGChecker; + //---------------------------------------------------------------------------- struct cmGeneratorExpressionEvaluator { @@ -46,8 +48,8 @@ struct cmGeneratorExpressionEvaluator virtual Type GetType() const = 0; - virtual std::string Evaluate(cmGeneratorExpressionContext *context - ) const = 0; + virtual std::string Evaluate(cmGeneratorExpressionContext *context, + cmGeneratorExpressionDAGChecker *) const = 0; private: cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator &); @@ -62,7 +64,8 @@ struct TextContent : public cmGeneratorExpressionEvaluator } - std::string Evaluate(cmGeneratorExpressionContext *) const + std::string Evaluate(cmGeneratorExpressionContext *, + cmGeneratorExpressionDAGChecker *) const { return std::string(this->Content, this->Length); } @@ -107,7 +110,8 @@ struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator return cmGeneratorExpressionEvaluator::Generator; } - std::string Evaluate(cmGeneratorExpressionContext *context) const; + std::string Evaluate(cmGeneratorExpressionContext *context, + cmGeneratorExpressionDAGChecker *) const; std::string GetOriginalExpression() const; |