[Cmake-commits] [cmake-commits] king committed cmGetFilenameComponentCommand.cxx 1.18 1.19 cmGetFilenameComponentCommand.h 1.14 1.15

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Feb 6 08:33:54 EST 2009


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

Modified Files:
	cmGetFilenameComponentCommand.cxx 
	cmGetFilenameComponentCommand.h 
Log Message:
BUG: Alternative fix to bug #8423

The patch used to fix this bug used SystemTools::GetRealPath which works
only for existing files.  It broke the case of using the command
get_filename_component for a non-existing file.  Also, it changed
long-standing behavior in a possibly incompatible way even for existing
files.  This reverts the original fix and instead updates the
documentation to be consistent with the behavior.


Index: cmGetFilenameComponentCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetFilenameComponentCommand.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** cmGetFilenameComponentCommand.h	23 Jan 2008 15:27:59 -0000	1.14
--- cmGetFilenameComponentCommand.h	6 Feb 2009 13:33:52 -0000	1.15
***************
*** 73,77 ****
        "Set VarName to be the path (PATH), file name (NAME), file "
        "extension (EXT), file name without extension (NAME_WE) of FileName, "
!       "or the full absolute (ABSOLUTE) file name without symlinks.  "
        "Note that the path is converted to Unix slashes format and has no "
        "trailing slashes. The longest file extension is always considered. "
--- 73,77 ----
        "Set VarName to be the path (PATH), file name (NAME), file "
        "extension (EXT), file name without extension (NAME_WE) of FileName, "
!       "or the full path (ABSOLUTE).  "
        "Note that the path is converted to Unix slashes format and has no "
        "trailing slashes. The longest file extension is always considered. "

Index: cmGetFilenameComponentCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetFilenameComponentCommand.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -C 2 -d -r1.18 -r1.19
*** cmGetFilenameComponentCommand.cxx	29 Jan 2009 16:39:03 -0000	1.18
--- cmGetFilenameComponentCommand.cxx	6 Feb 2009 13:33:52 -0000	1.19
***************
*** 92,97 ****
  
      // Collapse the path to its simplest form.
!     filename = cmSystemTools::CollapseFullPath(filename.c_str());
!     result   = cmSystemTools::GetRealPath(filename.c_str());
      }
    else 
--- 92,96 ----
  
      // Collapse the path to its simplest form.
!     result = cmSystemTools::CollapseFullPath(filename.c_str());
      }
    else 



More information about the Cmake-commits mailing list