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

Method FindNormalProgramDirsPerName

Source/cmFindProgramCommand.cxx:266–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266std::string cmFindProgramCommand::FindNormalProgramDirsPerName()
267{
268 // Search the entire path for each name.
269 cmFindProgramHelper helper(this->Makefile, this, this->DebugState.get());
270 for (std::string const& n : this->Names) {
271 // Switch to searching for this name.
272 helper.SetName(n);
273
274 // Check for the names themselves if they contain a directory separator.
275 if (helper.CheckCompoundNames()) {
276 return helper.BestPath;
277 }
278
279 // Search every directory.
280 for (std::string const& sp : this->SearchPaths) {
281 if (helper.CheckDirectory(sp)) {
282 return helper.BestPath;
283 }
284 }
285 }
286 // Couldn't find the program.
287 return "";
288}
289
290std::string cmFindProgramCommand::FindAppBundle()
291{

Callers 1

FindNormalProgramMethod · 0.95

Calls 4

CheckCompoundNamesMethod · 0.80
getMethod · 0.45
SetNameMethod · 0.45
CheckDirectoryMethod · 0.45

Tested by

no test coverage detected