diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 6e293d51a8..840f5112d6 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -406,9 +406,3 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate( this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr, this->Language); } - -const std::string& cmGeneratorExpressionInterpreter::Evaluate( - const char* expression, const std::string& property) -{ - return this->Evaluate(std::string(expression ? expression : ""), property); -} diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 75bba02d2e..09d8b8863b 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -199,8 +199,6 @@ public: const std::string& Evaluate(std::string expression, const std::string& property); - const std::string& Evaluate(const char* expression, - const std::string& property); protected: cmGeneratorExpression GeneratorExpression; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ccd8e7e9bc..b202e9158c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5411,8 +5411,7 @@ bool getTypedProperty(cmGeneratorTarget const* tgt, } cmProp value = tgt->GetProperty(prop); - return cmIsOn( - genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop)); + return cmIsOn(genexInterpreter->Evaluate(value ? *value : "", prop)); } template <> @@ -5426,8 +5425,7 @@ const char* getTypedProperty( return value ? value->c_str() : nullptr; } - return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop) - .c_str(); + return genexInterpreter->Evaluate(value ? *value : "", prop).c_str(); } template <> @@ -5441,7 +5439,7 @@ std::string getTypedProperty( return valueAsString(value ? value->c_str() : nullptr); } - return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop); + return genexInterpreter->Evaluate(value ? *value : "", prop); } template