| 5375 | int NumExpectedParameters() const override { return OneOrMoreParameters; } |
| 5376 | |
| 5377 | std::string Evaluate( |
| 5378 | std::vector<std::string> const& parameters, cm::GenEx::Evaluation* eval, |
| 5379 | GeneratorExpressionContent const* content, |
| 5380 | cmGeneratorExpressionDAGChecker* dagChecker) const override |
| 5381 | { |
| 5382 | if (parameters.size() > 2) { |
| 5383 | ::reportError(eval, content->GetOriginalExpression(), |
| 5384 | "Unexpected parameters, require one or two parameters."); |
| 5385 | return std::string{}; |
| 5386 | } |
| 5387 | |
| 5388 | cmGeneratorTarget* target = |
| 5389 | this->GetTarget(parameters, eval, content, dagChecker); |
| 5390 | if (!target) { |
| 5391 | return std::string(); |
| 5392 | } |
| 5393 | |
| 5394 | Postfix postfix = Postfix::Unspecified; |
| 5395 | if (parameters.size() == 2) { |
| 5396 | if (parameters[1] == "POSTFIX:INCLUDE") { |
| 5397 | postfix = Postfix::Include; |
| 5398 | } else if (parameters[1] == "POSTFIX:EXCLUDE") { |
| 5399 | postfix = Postfix::Exclude; |
| 5400 | } else { |
| 5401 | ::reportError(eval, content->GetOriginalExpression(), |
| 5402 | "Wrong second parameter: \"POSTFIX:INCLUDE\" or " |
| 5403 | "\"POSTFIX:EXCLUDE\" is expected"); |
| 5404 | } |
| 5405 | } |
| 5406 | |
| 5407 | std::string result = TargetOutputNameArtifactResultGetter<ArtifactT>::Get( |
| 5408 | target, eval, content, postfix); |
| 5409 | if (eval->HadError) { |
| 5410 | return std::string(); |
| 5411 | } |
| 5412 | return result; |
| 5413 | } |
| 5414 | }; |
| 5415 | |
| 5416 | static TargetFileBaseNameArtifact<ArtifactNameTag> const |
nothing calls this directly
no test coverage detected