[cmake-commits] alex committed cmFindBase.cxx 1.29 1.30
cmake-commits at cmake.org
cmake-commits at cmake.org
Sun Jan 6 17:18:17 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv28512
Modified Files:
cmFindBase.cxx
Log Message:
BUG: fix #6105, if a directory inside CMAKE_FIND_ROOT_PATH is given to a
FIND_XXX() command, don't prepend the root to it (since it is already in
this root)
Alex
Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- cmFindBase.cxx 28 Dec 2007 17:01:37 -0000 1.29
+++ cmFindBase.cxx 6 Jan 2008 22:18:15 -0000 1.30
@@ -536,8 +536,18 @@
it != unrootedPaths.end();
++it )
{
- std::string rootedDir=*rootIt;
- rootedDir+=*it;
+ // if the current directory is already inside the current root, don't
+ // add the root again
+ std::string rootedDir;
+ if (cmSystemTools::IsSubDirectory(it->c_str(), rootIt->c_str()))
+ {
+ rootedDir = *it;
+ }
+ else
+ {
+ rootedDir=*rootIt;
+ rootedDir+=*it;
+ }
this->SearchPaths.push_back(rootedDir);
}
}
More information about the Cmake-commits
mailing list