| 241 | } |
| 242 | |
| 243 | std::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 | |
| 266 | std::string cmFindProgramCommand::FindNormalProgramDirsPerName() |
| 267 | { |
no test coverage detected