ENH: Add another signature to FindProgram that matches more to the one from CMake
This commit is contained in:
parent
9c64a17845
commit
33c891f8d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue