[Cmake-commits] [cmake-commits] david.cole committed Glob.cxx 1.13 1.14 Glob.hxx.in 1.7 1.8
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Aug 20 13:24:18 EDT 2008
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv3519/Source/kwsys
Modified Files:
Glob.cxx Glob.hxx.in
Log Message:
ENH: Add RecurseThroughSymlinks data member to kwsys::Glob. Allows recursive globs to skip symlinks when necessary. Default to true for backwards compatible behavior. Used from the ctest coverage handler to avoid recursing through the '/Applications' directory on the Mac looking for *.da files... Should fix the hangs reported recently by Mac CMake dashboard submitters.
Index: Glob.hxx.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/Glob.hxx.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** Glob.hxx.in 16 Aug 2007 11:38:47 -0000 1.7
--- Glob.hxx.in 20 Aug 2008 17:24:16 -0000 1.8
***************
*** 58,61 ****
--- 58,68 ----
bool GetRecurse() { return this->Recurse; }
+ //! Set recurse through symlinks to true if recursion should traverse the
+ // linked-to directories
+ void RecurseThroughSymlinksOn() { this->SetRecurseThroughSymlinks(true); }
+ void RecurseThroughSymlinksOff() { this->SetRecurseThroughSymlinks(false); }
+ void SetRecurseThroughSymlinks(bool i) { this->RecurseThroughSymlinks = i; }
+ bool GetRecurseThroughSymlinks() { return this->RecurseThroughSymlinks; }
+
//! Set relative to true to only show relative path to files.
void SetRelative(const char* dir);
***************
*** 91,94 ****
--- 98,102 ----
bool Recurse;
kwsys_stl::string Relative;
+ bool RecurseThroughSymlinks;
private:
Index: Glob.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/Glob.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** Glob.cxx 21 Aug 2007 19:30:07 -0000 1.13
--- Glob.cxx 20 Aug 2008 17:24:16 -0000 1.14
***************
*** 64,67 ****
--- 64,71 ----
this->Recurse = false;
this->Relative = "";
+
+ this->RecurseThroughSymlinks = true;
+ // RecurseThroughSymlinks is true by default for backwards compatibility,
+ // not because it's a good idea...
}
***************
*** 263,267 ****
if ( kwsys::SystemTools::FileIsDirectory(realname.c_str()) )
{
! this->RecurseDirectory(start+1, realname, dir_only);
}
}
--- 267,275 ----
if ( kwsys::SystemTools::FileIsDirectory(realname.c_str()) )
{
! if (!kwsys::SystemTools::FileIsSymlink(realname.c_str()) ||
! this->RecurseThroughSymlinks)
! {
! this->RecurseDirectory(start+1, realname, dir_only);
! }
}
}
More information about the Cmake-commits
mailing list