summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpression.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-08-25 19:57:00 -0400
committerBrad King <brad.king@kitware.com>2018-08-28 13:56:29 -0400
commit65ab9ce93882070191ad84fe96239e50d0b62b6e (patch)
treed2f52de2bf29664c675b2f3f328a459c795b1537 /Source/cmGeneratorExpression.cxx
parent0b26ab15c4b2c61e377b46d5b912a2893ef65e26 (diff)
downloadcmake-65ab9ce93882070191ad84fe96239e50d0b62b6e.tar.gz
Genex: Return Evaluate results as const std::string&
Also remove unused overloads.
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index b1b2b8834e..6823cd53db 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -386,11 +386,11 @@ void cmCompiledGeneratorExpression::GetMaxLanguageStandard(
}
}
-const char* cmGeneratorExpressionInterpreter::Evaluate(
+const std::string& cmGeneratorExpressionInterpreter::Evaluate(
const char* expression, const std::string& property)
{
if (this->Target.empty()) {
- return this->EvaluateExpression(expression).c_str();
+ return this->EvaluateExpression(expression);
}
// Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS
@@ -398,5 +398,5 @@ const char* cmGeneratorExpressionInterpreter::Evaluate(
this->Target, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property,
nullptr, nullptr);
- return this->EvaluateExpression(expression, &dagChecker).c_str();
+ return this->EvaluateExpression(expression, &dagChecker);
}