[Cmake-commits] [cmake-commits] hoffman committed Glob.cxx 1.16 1.17 Glob.hxx.in 1.9 1.10
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Sep 14 13:45:42 EDT 2009
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv10324/Source/kwsys
Modified Files:
Glob.cxx Glob.hxx.in
Log Message:
Fix for Bug #9190, -U did not work on case insensitive file systems because of call to glob convert to regex that expected to work with files.
Index: Glob.hxx.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/Glob.hxx.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C 2 -d -r1.9 -r1.10
*** Glob.hxx.in 11 Sep 2008 18:34:04 -0000 1.9
--- Glob.hxx.in 14 Sep 2009 17:45:40 -0000 1.10
***************
*** 80,84 ****
expressions more easily (regex1|regex2|etc). */
static kwsys_stl::string PatternToRegex(const kwsys_stl::string& pattern,
! bool require_whole_string = true);
protected:
--- 80,85 ----
expressions more easily (regex1|regex2|etc). */
static kwsys_stl::string PatternToRegex(const kwsys_stl::string& pattern,
! bool require_whole_string = true,
! bool preserve_case = false);
protected:
Index: Glob.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/Glob.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -C 2 -d -r1.16 -r1.17
*** Glob.cxx 17 Mar 2009 14:48:24 -0000 1.16
--- Glob.cxx 14 Sep 2009 17:45:40 -0000 1.17
***************
*** 85,89 ****
//----------------------------------------------------------------------------
kwsys_stl::string Glob::PatternToRegex(const kwsys_stl::string& pattern,
! bool require_whole_string)
{
// Incrementally build the regular expression from the pattern.
--- 85,90 ----
//----------------------------------------------------------------------------
kwsys_stl::string Glob::PatternToRegex(const kwsys_stl::string& pattern,
! bool require_whole_string,
! bool preserve_case)
{
// Incrementally build the regular expression from the pattern.
***************
*** 196,203 ****
// On case-insensitive systems file names are converted to lower
// case before matching.
! ch = tolower(ch);
}
#endif
!
// Store the character.
regex.append(1, static_cast<char>(ch));
--- 197,207 ----
// On case-insensitive systems file names are converted to lower
// case before matching.
! if(!preserve_case)
! {
! ch = tolower(ch);
! }
}
#endif
! (void)preserve_case;
// Store the character.
regex.append(1, static_cast<char>(ch));
More information about the Cmake-commits
mailing list