[Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx 1.314 1.315 cmLocalGenerator.h 1.116 1.117
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Sep 22 16:16:58 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv3368/Source
Modified Files:
cmLocalGenerator.cxx cmLocalGenerator.h
Log Message:
Optionally force conversion to relative path
In cmLocalGenerator::ConvertToRelativePath we normally convert to
relative path only if the local and remote paths both lie inside the
source tree or both lie inside the build tree. This commit adds an
optional 'force' argument to allow conversion even when this rule is
violated.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.314
retrieving revision 1.315
diff -C 2 -d -r1.314 -r1.315
*** cmLocalGenerator.cxx 19 Sep 2009 14:14:31 -0000 1.314
--- cmLocalGenerator.cxx 22 Sep 2009 20:16:55 -0000 1.315
***************
*** 2304,2308 ****
std::string
cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local,
! const char* in_remote)
{
// The path should never be quoted.
--- 2304,2308 ----
std::string
cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local,
! const char* in_remote, bool force)
{
// The path should never be quoted.
***************
*** 2325,2341 ****
}
! // Skip conversion if the path and local are not both in the source
! // or both in the binary tree.
! std::string local_path = cmSystemTools::JoinPath(local);
! if(!((cmLocalGeneratorNotAbove(local_path.c_str(),
! this->RelativePathTopBinary.c_str()) &&
! cmLocalGeneratorNotAbove(in_remote,
! this->RelativePathTopBinary.c_str())) ||
! (cmLocalGeneratorNotAbove(local_path.c_str(),
! this->RelativePathTopSource.c_str()) &&
! cmLocalGeneratorNotAbove(in_remote,
! this->RelativePathTopSource.c_str()))))
{
! return in_remote;
}
--- 2325,2344 ----
}
! if(!force)
{
! // Skip conversion if the path and local are not both in the source
! // or both in the binary tree.
! std::string local_path = cmSystemTools::JoinPath(local);
! if(!((cmLocalGeneratorNotAbove(local_path.c_str(),
! this->RelativePathTopBinary.c_str()) &&
! cmLocalGeneratorNotAbove(in_remote,
! this->RelativePathTopBinary.c_str())) ||
! (cmLocalGeneratorNotAbove(local_path.c_str(),
! this->RelativePathTopSource.c_str()) &&
! cmLocalGeneratorNotAbove(in_remote,
! this->RelativePathTopSource.c_str()))))
! {
! return in_remote;
! }
}
Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.116
retrieving revision 1.117
diff -C 2 -d -r1.116 -r1.117
*** cmLocalGenerator.h 3 Sep 2009 12:27:00 -0000 1.116
--- cmLocalGenerator.h 22 Sep 2009 20:16:56 -0000 1.117
***************
*** 261,265 ****
*/
std::string ConvertToRelativePath(const std::vector<std::string>& local,
! const char* remote);
/**
--- 261,265 ----
*/
std::string ConvertToRelativePath(const std::vector<std::string>& local,
! const char* remote, bool force=false);
/**
More information about the Cmake-commits
mailing list