summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpression.h
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-08-16 12:09:42 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2018-08-16 12:09:42 (GMT)
commit16e17376c74b68d8e62658c63210a30da6b98428 (patch)
tree739d4fd75db722cfea8b99e1e6bf067011c8da5d /Source/cmGeneratorExpression.h
parentba122ad2a48c58653dc033345f87fa6a717a8c8a (diff)
downloadCMake-16e17376c74b68d8e62658c63210a30da6b98428.zip
CMake-16e17376c74b68d8e62658c63210a30da6b98428.tar.gz
CMake-16e17376c74b68d8e62658c63210a30da6b98428.tar.bz2
EvaluateExpression() returns std::string
Diffstat (limited to 'Source/cmGeneratorExpression.h')
-rw-r--r--Source/cmGeneratorExpression.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 2899317..1ceb7da 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -181,7 +181,7 @@ public:
const char* Evaluate(const char* expression)
{
- return this->EvaluateExpression(expression);
+ return this->EvaluateExpression(expression).c_str();
}
const char* Evaluate(const std::string& expression)
{
@@ -212,7 +212,7 @@ protected:
const std::string& GetTargetName() const { return this->Target; }
const std::string& GetLanguage() const { return this->Language; }
- const char* EvaluateExpression(
+ const std::string& EvaluateExpression(
const char* expression,
cmGeneratorExpressionDAGChecker* dagChecker = nullptr)
{
@@ -220,16 +220,13 @@ protected:
this->GeneratorExpression.Parse(expression);
if (dagChecker == nullptr) {
- return this->CompiledGeneratorExpression
- ->Evaluate(this->LocalGenerator, this->Config, false,
- this->GeneratorTarget)
- .c_str();
+ return this->CompiledGeneratorExpression->Evaluate(
+ this->LocalGenerator, this->Config, false, this->GeneratorTarget);
}
- return this->CompiledGeneratorExpression
- ->Evaluate(this->LocalGenerator, this->Config, false,
- this->GeneratorTarget, dagChecker, this->Language)
- .c_str();
+ return this->CompiledGeneratorExpression->Evaluate(
+ this->LocalGenerator, this->Config, false, this->GeneratorTarget,
+ dagChecker, this->Language);
}
private: