[Cmake-commits] [cmake-commits] king committed cmGetFilenameComponentCommand.cxx 1.20 1.21
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jul 23 08:10:08 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17125/Source
Modified Files:
cmGetFilenameComponentCommand.cxx
Log Message:
BUG: Fix get_filename_component ABSOLUTE mode
This teaches the command to recognize full windows paths when built on
UNIX. CollapseFullPath knows when the input path is relative better
than FileIsFullPath because the latter is only meant for paths from the
host platform.
Index: cmGetFilenameComponentCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetFilenameComponentCommand.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** cmGetFilenameComponentCommand.cxx 9 Feb 2009 14:23:55 -0000 1.20
--- cmGetFilenameComponentCommand.cxx 23 Jul 2009 12:10:02 -0000 1.21
***************
*** 79,97 ****
args[2] == "REALPATH")
{
// If the path given is relative evaluate it relative to the
// current source directory.
! if(!cmSystemTools::FileIsFullPath(filename.c_str()))
! {
! std::string fname = this->Makefile->GetCurrentDirectory();
! if(!fname.empty())
! {
! fname += "/";
! fname += filename;
! filename = fname;
! }
! }
!
! // Collapse the path to its simplest form.
! result = cmSystemTools::CollapseFullPath(filename.c_str());
if(args[2] == "REALPATH")
{
--- 79,87 ----
args[2] == "REALPATH")
{
+ // Collapse the path to its simplest form.
// If the path given is relative evaluate it relative to the
// current source directory.
! result = cmSystemTools::CollapseFullPath(
! filename.c_str(), this->Makefile->GetCurrentDirectory());
if(args[2] == "REALPATH")
{
More information about the Cmake-commits
mailing list