diff options
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index eb8cdc8..cd6a40b 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -713,98 +713,6 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode } installPrefixNode; //---------------------------------------------------------------------------- -static const struct LinkedNode : public cmGeneratorExpressionNode -{ - LinkedNode() {} - - virtual bool GeneratesContent() const { return true; } - virtual int NumExpectedParameters() const { return 1; } - virtual bool RequiresLiteralInput() const { return true; } - - std::string Evaluate(const std::vector<std::string> ¶meters, - cmGeneratorExpressionContext *context, - const GeneratorExpressionContent *content, - cmGeneratorExpressionDAGChecker *dagChecker) const - { - if (dagChecker->EvaluatingIncludeDirectories()) - { - return this->GetInterfaceProperty(parameters.front(), - "INCLUDE_DIRECTORIES", - context, content, dagChecker); - } - if (dagChecker->EvaluatingCompileDefinitions()) - { - return this->GetInterfaceProperty(parameters.front(), - "COMPILE_DEFINITIONS", - context, content, dagChecker); - } - - reportError(context, content->GetOriginalExpression(), - "$<LINKED:...> may only be used in INCLUDE_DIRECTORIES and " - "COMPILE_DEFINITIONS properties."); - - return std::string(); - } - -private: - std::string GetInterfaceProperty(const std::string &item, - const std::string &prop, - cmGeneratorExpressionContext *context, - const GeneratorExpressionContent *content, - cmGeneratorExpressionDAGChecker *dagCheckerParent) const - { - cmTarget *target = context->CurrentTarget - ->GetMakefile()->FindTargetToUse(item.c_str()); - if (!target) - { - return std::string(); - } - std::string propertyName = "INTERFACE_" + prop; - const char *propContent = target->GetProperty(propertyName.c_str()); - if (!propContent) - { - return std::string(); - } - - cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, - target->GetName(), - propertyName, - content, - dagCheckerParent); - - switch (dagChecker.check()) - { - case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: - dagChecker.reportError(context, content->GetOriginalExpression()); - return std::string(); - case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: - // No error. We just skip cyclic references. - return std::string(); - case cmGeneratorExpressionDAGChecker::ALREADY_SEEN: - // No error. We're not going to find anything new here. - return std::string(); - case cmGeneratorExpressionDAGChecker::DAG: - break; - } - - cmGeneratorExpression ge(context->Backtrace); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(propContent); - std::string result = cge->Evaluate(context->Makefile, - context->Config, - context->Quiet, - context->HeadTarget, - target, - &dagChecker); - if (cge->GetHadContextSensitiveCondition()) - { - context->HadContextSensitiveCondition = true; - } - return result; - } - -} linkedNode; - -//---------------------------------------------------------------------------- template<bool linker, bool soname> struct TargetFilesystemArtifactResultCreator { @@ -1038,8 +946,6 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier) return &targetDefinedNode; else if (identifier == "INSTALL_PREFIX") return &installPrefixNode; - else if (identifier == "LINKED") - return &linkedNode; return 0; } |