From 297c63fa65327491a2b50e521b661c5835a19fe4 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 13 Aug 2013 07:48:01 -0400 Subject: Imported Upstream version 2.8.11.2 --- Source/cmGeneratorExpression.h | 66 +++++++++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 14 deletions(-) (limited to 'Source/cmGeneratorExpression.h') diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 29d3f444f..86b6f25df 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -14,13 +14,14 @@ #define cmGeneratorExpression_h #include "cmStandardIncludes.h" +#include "cmListFileCache.h" #include #include +#include class cmTarget; -class cmGeneratorTarget; class cmMakefile; class cmListFileBacktrace; @@ -45,22 +46,32 @@ public: cmGeneratorExpression(cmListFileBacktrace const& backtrace); ~cmGeneratorExpression(); - const cmCompiledGeneratorExpression& Parse(std::string const& input); - const cmCompiledGeneratorExpression& Parse(const char* input); + cmsys::auto_ptr Parse( + std::string const& input); + cmsys::auto_ptr Parse(const char* input); enum PreprocessContext { - StripAllGeneratorExpressions + StripAllGeneratorExpressions, + BuildInterface, + InstallInterface }; static std::string Preprocess(const std::string &input, PreprocessContext context); + static void Split(const std::string &input, + std::vector &output); + + static std::string::size_type Find(const std::string &input); + + static bool IsValidTargetName(const std::string &input); + + static std::string StripEmptyListElements(const std::string &input); private: cmGeneratorExpression(const cmGeneratorExpression &); void operator=(const cmGeneratorExpression &); cmListFileBacktrace const& Backtrace; - cmCompiledGeneratorExpression *CompiledExpression; }; class cmCompiledGeneratorExpression @@ -68,32 +79,59 @@ class cmCompiledGeneratorExpression public: const char* Evaluate(cmMakefile* mf, const char* config, bool quiet = false, - cmGeneratorTarget *target = 0, + cmTarget *headTarget = 0, + cmTarget *currentTarget = 0, cmGeneratorExpressionDAGChecker *dagChecker = 0) const; + const char* Evaluate(cmMakefile* mf, const char* config, + bool quiet, + cmTarget *headTarget, + cmGeneratorExpressionDAGChecker *dagChecker) const; /** Get set of targets found during evaluations. */ std::set const& GetTargets() const - { return this->Targets; } + { return this->DependTargets; } + + std::set const& GetSeenTargetProperties() const + { return this->SeenTargetProperties; } + + std::set const& GetAllTargetsSeen() const + { return this->AllTargetsSeen; } ~cmCompiledGeneratorExpression(); + std::string GetInput() const + { + return this->Input; + } + + cmListFileBacktrace GetBacktrace() const + { + return this->Backtrace; + } + bool GetHadContextSensitiveCondition() const + { + return this->HadContextSensitiveCondition; + } + private: cmCompiledGeneratorExpression(cmListFileBacktrace const& backtrace, - const std::vector &evaluators, - const char *input, bool needsParsing); + const char *input); friend class cmGeneratorExpression; cmCompiledGeneratorExpression(const cmCompiledGeneratorExpression &); void operator=(const cmCompiledGeneratorExpression &); - cmListFileBacktrace const& Backtrace; - const std::vector Evaluators; - const char* const Input; - const bool NeedsParsing; + cmListFileBacktrace Backtrace; + std::vector Evaluators; + const std::string Input; + bool NeedsParsing; - mutable std::set Targets; + mutable std::set DependTargets; + mutable std::set AllTargetsSeen; + mutable std::set SeenTargetProperties; mutable std::string Output; + mutable bool HadContextSensitiveCondition; }; #endif -- cgit v1.2.3