[Cmake-commits] [cmake-commits] king committed SystemTools.cxx 1.238 1.239 SystemTools.hxx.in 1.76 1.77

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Apr 21 11:37:01 EDT 2009


Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv9163/Source/kwsys

Modified Files:
	SystemTools.cxx SystemTools.hxx.in 
Log Message:
ENH: Remove obscure method from KWSys SystemTools

This removes SystemTools::FileExistsInParentDirectories from KWSys since
it is a special-purpose method that is not generally useful.


Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.238
retrieving revision 1.239
diff -C 2 -d -r1.238 -r1.239
*** SystemTools.cxx	20 Apr 2009 12:42:05 -0000	1.238
--- SystemTools.cxx	21 Apr 2009 15:36:59 -0000	1.239
***************
*** 4001,4027 ****
  }
  
- kwsys_stl::string SystemTools::FileExistsInParentDirectories(const char* fname,
-   const char* directory, const char* toplevel)
- {
-   kwsys_stl::string file = fname;
-   SystemTools::ConvertToUnixSlashes(file);
-   kwsys_stl::string dir = directory;
-   SystemTools::ConvertToUnixSlashes(dir);
-   while ( !dir.empty() )
-     {
-     kwsys_stl::string path = dir + "/" + file;
-     if ( SystemTools::FileExists(path.c_str()) )
-       {
-       return path;
-       }
-     if ( dir.size() < strlen(toplevel) )
-       {
-       break;
-       }
-     dir = SystemTools::GetParentDirectory(dir.c_str());
-     }
-   return "";
- }
- 
  void SystemTools::Delay(unsigned int msec)
  {
--- 4001,4004 ----

Index: SystemTools.hxx.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.hxx.in,v
retrieving revision 1.76
retrieving revision 1.77
diff -C 2 -d -r1.76 -r1.77
*** SystemTools.hxx.in	9 Feb 2009 14:23:13 -0000	1.76
--- SystemTools.hxx.in	21 Apr 2009 15:36:59 -0000	1.77
***************
*** 660,671 ****
                                kwsys_stl::string& filename_found,
                                int try_filename_dirs = 0);
-   
-   /** 
-    * Check if the given file exists in one of the parent directory of the
-    * given file or directory and if it does, return the name of the file.
-    * Toplevel specifies the top-most directory to where it will look.
-    */
-   static kwsys_stl::string FileExistsInParentDirectories(const char* fname,
-     const char* directory, const char* toplevel);
  
    /** compute the relative path from local to remote.  local must 
--- 660,663 ----



More information about the Cmake-commits mailing list