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

Method FindMakeProgram

Source/cmGlobalNinjaGenerator.cxx:743–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

741}
742
743bool 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
772void cmGlobalNinjaGenerator::CheckNinjaFeatures()
773{

Callers

nothing calls this directly

Calls 8

CheckNinjaFeaturesMethod · 0.95
cmTrimWhitespaceFunction · 0.85
push_backMethod · 0.80
emplace_backMethod · 0.80
cmStrCatFunction · 0.70
cmJoinFunction · 0.70
GetDefinitionMethod · 0.45
IssueMessageMethod · 0.45

Tested by

no test coverage detected