| 27 | } |
| 28 | |
| 29 | std::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 | |
| 64 | std::string GeneratorExpressionContent::Evaluate( |
| 65 | cm::GenEx::Evaluation* eval, |
no test coverage detected