mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user