summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallScriptGenerator.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-22 07:53:44 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-23 19:19:15 (GMT)
commit7dcf9cb83c2082168f218be8f21b95b77cc95a86 (patch)
treeee1435acc933654c5d643e3ca5777670407f2cb1 /Source/cmInstallScriptGenerator.cxx
parentc7c59dae82594557dc2fddc4ef881dafeaad076a (diff)
downloadCMake-7dcf9cb83c2082168f218be8f21b95b77cc95a86.zip
CMake-7dcf9cb83c2082168f218be8f21b95b77cc95a86.tar.gz
CMake-7dcf9cb83c2082168f218be8f21b95b77cc95a86.tar.bz2
cmGeneratorExpression: Add cmGeneratorExpression::Evaluate utility
cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is needed or an instance of cmCompiledGeneratorExpression cannot be cached. Fixes: #19686
Diffstat (limited to 'Source/cmInstallScriptGenerator.cxx')
-rw-r--r--Source/cmInstallScriptGenerator.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx
index b7b7817..ea29455 100644
--- a/Source/cmInstallScriptGenerator.cxx
+++ b/Source/cmInstallScriptGenerator.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstallScriptGenerator.h"
-#include <memory>
#include <ostream>
#include <vector>
@@ -79,11 +78,9 @@ void cmInstallScriptGenerator::GenerateScriptForConfig(
std::ostream& os, const std::string& config, Indent indent)
{
if (this->AllowGenex) {
- cmGeneratorExpression ge;
- std::unique_ptr<cmCompiledGeneratorExpression> cge =
- ge.Parse(this->Script);
this->AddScriptInstallRule(os, indent,
- cge->Evaluate(this->LocalGenerator, config));
+ cmGeneratorExpression::Evaluate(
+ this->Script, this->LocalGenerator, config));
} else {
this->AddScriptInstallRule(os, indent, this->Script);
}