diff options
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index df8f137..a306888 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1947,6 +1947,22 @@ kwsys_stl::string SystemTools::FindProgram( return ""; } +kwsys_stl::string SystemTools::FindProgram( + const kwsys_stl::vector<kwsys_stl::string>& names, + const kwsys_stl::vector<kwsys_stl::string>& path, + bool noSystemPath) +{ + for(kwsys_stl::vector<kwsys_stl::string>::const_iterator it = names.begin(); + it != names.end() ; ++it) + { + // Try to find the program. + std::string result = SystemTools::FindProgram(it->c_str(), + path, + noSystemPath); + return result; + } + return ""; +} /** * Find the library with the given name. Searches the given path and then |