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

Method FindNormalProgramNamesPerDir

Source/cmFindProgramCommand.cxx:243–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243std::string cmFindProgramCommand::FindNormalProgramNamesPerDir()
244{
245 // Search for all names in each directory.
246 cmFindProgramHelper helper(this->Makefile, this, this->DebugState.get());
247 for (std::string const& n : this->Names) {
248 helper.AddName(n);
249 }
250
251 // Check for the names themselves if they contain a directory separator.
252 if (helper.CheckCompoundNames()) {
253 return helper.BestPath;
254 }
255
256 // Search every directory.
257 for (std::string const& sp : this->SearchPaths) {
258 if (helper.CheckDirectory(sp)) {
259 return helper.BestPath;
260 }
261 }
262 // Couldn't find the program.
263 return "";
264}
265
266std::string cmFindProgramCommand::FindNormalProgramDirsPerName()
267{

Callers 1

FindNormalProgramMethod · 0.95

Calls 4

CheckCompoundNamesMethod · 0.80
getMethod · 0.45
AddNameMethod · 0.45
CheckDirectoryMethod · 0.45

Tested by

no test coverage detected