[cmake-commits] king committed cmFindLibraryCommand.cxx 1.46 1.47
cmake-commits at cmake.org
cmake-commits at cmake.org
Sun Jan 20 17:41:16 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv3987/Source
Modified Files:
cmFindLibraryCommand.cxx
Log Message:
BUG: Make sure search paths never have double-slashes. Leading with two slashes (//) on cygwin looks like a network path and delays while waiting for a non-existent machine. This file was left out of the previous checkin for this problem.
Index: cmFindLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.cxx,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- cmFindLibraryCommand.cxx 17 Jan 2008 14:02:31 -0000 1.46
+++ cmFindLibraryCommand.cxx 20 Jan 2008 22:41:14 -0000 1.47
@@ -181,6 +181,16 @@
std::vector<std::string> suffixes;
cmSystemTools::ExpandListArgument(prefixes_list, prefixes, true);
cmSystemTools::ExpandListArgument(suffixes_list, suffixes, true);
+ // Add a trailing slash to all paths to aid the search process.
+ for(std::vector<std::string>::iterator i = this->SearchPaths.begin();
+ i != this->SearchPaths.end(); ++i)
+ {
+ std::string& p = *i;
+ if(p[p.size()-1] != '/')
+ {
+ p += "/";
+ }
+ }
std::string tryPath;
for(std::vector<std::string>::const_iterator p = this->SearchPaths.begin();
p != this->SearchPaths.end(); ++p)
@@ -188,7 +198,6 @@
if(supportFrameworks)
{
tryPath = *p;
- tryPath += "/";
tryPath += name;
tryPath += ".framework";
if(cmSystemTools::FileExists(tryPath.c_str())
@@ -209,7 +218,6 @@
suffix != suffixes.end(); ++suffix)
{
tryPath = *p;
- tryPath += "/";
tryPath += *prefix;
tryPath += name;
tryPath += *suffix;
More information about the Cmake-commits
mailing list