| 538 | } |
| 539 | |
| 540 | bool cmTryRunCommand(std::vector<std::string> const& args, |
| 541 | cmExecutionStatus& status) |
| 542 | { |
| 543 | cmMakefile& mf = status.GetMakefile(); |
| 544 | |
| 545 | if (args.size() < 4) { |
| 546 | mf.IssueMessage(MessageType::FATAL_ERROR, |
| 547 | "The try_run() command requires at least 4 arguments."); |
| 548 | return false; |
| 549 | } |
| 550 | |
| 551 | if (mf.GetCMakeInstance()->GetState()->GetRole() == |
| 552 | cmState::Role::FindPackage) { |
| 553 | mf.IssueMessage( |
| 554 | MessageType::FATAL_ERROR, |
| 555 | "The try_run() command is not supported in --find-package mode."); |
| 556 | return false; |
| 557 | } |
| 558 | |
| 559 | TryRunCommandImpl tr(&mf); |
| 560 | return tr.TryRunCode(args); |
| 561 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…