| 741 | } |
| 742 | |
| 743 | bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf) |
| 744 | { |
| 745 | if (!this->cmGlobalGenerator::FindMakeProgram(mf)) { |
| 746 | return false; |
| 747 | } |
| 748 | if (cmValue ninjaCommand = mf->GetDefinition("CMAKE_MAKE_PROGRAM")) { |
| 749 | this->NinjaCommand = *ninjaCommand; |
| 750 | std::vector<std::string> command; |
| 751 | command.push_back(this->NinjaCommand); |
| 752 | command.emplace_back("--version"); |
| 753 | std::string version; |
| 754 | std::string error; |
| 755 | if (!cmSystemTools::RunSingleCommand(command, &version, &error, nullptr, |
| 756 | nullptr, |
| 757 | cmSystemTools::OUTPUT_NONE)) { |
| 758 | mf->IssueMessage(MessageType::FATAL_ERROR, |
| 759 | cmStrCat("Running\n '", cmJoin(command, "' '"), |
| 760 | "'\n" |
| 761 | "failed with:\n ", |
| 762 | error)); |
| 763 | cmSystemTools::SetFatalErrorOccurred(); |
| 764 | return false; |
| 765 | } |
| 766 | this->NinjaVersion = cmTrimWhitespace(version); |
| 767 | this->CheckNinjaFeatures(); |
| 768 | } |
| 769 | return true; |
| 770 | } |
| 771 | |
| 772 | void cmGlobalNinjaGenerator::CheckNinjaFeatures() |
| 773 | { |
nothing calls this directly
no test coverage detected