summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-06-19 18:27:01 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-06-19 18:27:01 (GMT)
commit590460aaaeec05751bf21c2f79250fcdffd2cfad (patch)
treeb77e22e99cdae6728d0195eb483d785e9d2af28b /Source/cmSystemTools.cxx
parent218efecd890bf41d968f2b56ef01ea6acd9664b7 (diff)
downloadCMake-590460aaaeec05751bf21c2f79250fcdffd2cfad.zip
CMake-590460aaaeec05751bf21c2f79250fcdffd2cfad.tar.gz
CMake-590460aaaeec05751bf21c2f79250fcdffd2cfad.tar.bz2
new function
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0ef39fd..b729333 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1703,6 +1703,28 @@ bool cmSystemTools::FileIsDirectory(const char* name)
}
}
+bool cmSystemTools::DoesFileExistWithExtensions(
+ const char* name,
+ const std::vector<std::string>& headerExts)
+{
+ std::string hname;
+
+ for( std::vector<std::string>::const_iterator ext = headerExts.begin();
+ ext != headerExts.end(); ++ext )
+ {
+ hname = name;
+ hname += ".";
+ hname += *ext;
+ if(cmSystemTools::FileExists(hname.c_str()))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
int cmSystemTools::ChangeDirectory(const char *dir)
{
return Chdir(dir);