MCPcopy Create free account
hub / github.com/Kitware/CMake / ProcessArbitraryContent

Method ProcessArbitraryContent

Source/cmGeneratorExpressionEvaluator.cxx:29–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29std::string GeneratorExpressionContent::ProcessArbitraryContent(
30 cmGeneratorExpressionNode const* node, std::string const& identifier,
31 cm::GenEx::Evaluation* eval, cmGeneratorExpressionDAGChecker* dagChecker,
32 std::vector<cmGeneratorExpressionEvaluatorVector>::const_iterator pit) const
33{
34 std::string result;
35
36 auto const pend = this->ParamChildren.end();
37 for (; pit != pend; ++pit) {
38 for (auto const& pExprEval : *pit) {
39 if (node->RequiresLiteralInput()) {
40 if (pExprEval->GetType() != cmGeneratorExpressionEvaluator::Text) {
41 reportError(eval, this->GetOriginalExpression(),
42 "$<" + identifier +
43 "> expression requires literal input.");
44 return std::string();
45 }
46 }
47 result += pExprEval->Evaluate(eval, dagChecker);
48 if (eval->HadError) {
49 return std::string();
50 }
51 }
52 if ((pit + 1) != pend) {
53 result += ",";
54 }
55 }
56 if (node->RequiresLiteralInput()) {
57 std::vector<std::string> parameters;
58 parameters.push_back(result);
59 return node->Evaluate(parameters, eval, this, dagChecker);
60 }
61 return result;
62}
63
64std::string GeneratorExpressionContent::Evaluate(
65 cm::GenEx::Evaluation* eval,

Callers 1

EvaluateParametersMethod · 0.95

Calls 7

GetOriginalExpressionMethod · 0.95
reportErrorFunction · 0.85
push_backMethod · 0.80
endMethod · 0.45
RequiresLiteralInputMethod · 0.45
GetTypeMethod · 0.45
EvaluateMethod · 0.45

Tested by

no test coverage detected