Commit c9213fbb authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: Add another signature to FindProgram that matches more to the one from CMake

parent 444d9b98
......@@ -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
......
......@@ -493,6 +493,11 @@ public:
const kwsys_stl::vector<kwsys_stl::string>& path =
kwsys_stl::vector<kwsys_stl::string>(),
bool no_system_path = false);
static kwsys_stl::string FindProgram(
const kwsys_stl::vector<kwsys_stl::string>& names,
const kwsys_stl::vector<kwsys_stl::string>& path =
kwsys_stl::vector<kwsys_stl::string>(),
bool no_system_path = false);
/**
* Find a library in the system PATH, with optional extra paths
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment