[Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx 1.294 1.295
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Feb 26 08:49:14 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv26884a/Source
Modified Files:
cmLocalGenerator.cxx
Log Message:
ENH: Simplify reverse cmLocalGenerator::Convert
It does not make sense to call the reverse Convert signature (for remote
paths corresponding to CMake-managed directories) with NONE or FULL
since they have no path. Patch from Modestas Vainius. See issue #7779.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.294
retrieving revision 1.295
diff -C 2 -d -r1.294 -r1.295
*** cmLocalGenerator.cxx 25 Feb 2009 16:44:46 -0000 1.294
--- cmLocalGenerator.cxx 26 Feb 2009 13:49:10 -0000 1.295
***************
*** 2201,2223 ****
{
const char* remotePath = this->GetRelativeRootPath(remote);
if(local && (!optional || this->UseRelativePaths))
{
std::vector<std::string> components;
! std::string result;
! switch(remote)
! {
! case HOME:
! case HOME_OUTPUT:
! case START:
! case START_OUTPUT:
! cmSystemTools::SplitPath(local, components);
! result = this->ConvertToRelativePath(components, remotePath);
! break;
! case FULL:
! result = remotePath;
! break;
! case NONE:
! break;
! }
return this->ConvertToOutputFormat(result.c_str(), output);
}
--- 2201,2213 ----
{
const char* remotePath = this->GetRelativeRootPath(remote);
+
+ // The relative root must have a path (i.e. not FULL or NONE)
+ assert(remotePath != 0);
+
if(local && (!optional || this->UseRelativePaths))
{
std::vector<std::string> components;
! cmSystemTools::SplitPath(local, components);
! std::string result = this->ConvertToRelativePath(components, remotePath);
return this->ConvertToOutputFormat(result.c_str(), output);
}
More information about the Cmake-commits
mailing list