summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-04-07 02:19:06 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-04-07 02:19:06 (GMT)
commitd7e50fb271663d0f9cd75725a02b755fa6bbf9de (patch)
treea14f6bd2fc10ce77955a2034f84d99f0d230468b /Source/cmFindBase.cxx
parent2014a95f91591e9c98b7d4a2a546b344fc38aaf0 (diff)
downloadCMake-d7e50fb271663d0f9cd75725a02b755fa6bbf9de.zip
CMake-d7e50fb271663d0f9cd75725a02b755fa6bbf9de.tar.gz
CMake-d7e50fb271663d0f9cd75725a02b755fa6bbf9de.tar.bz2
BUG: fix network path by mistake in search
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index f5f1430..8b54a91 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -495,7 +495,15 @@ void cmFindBase::ExpandRegistryAndCleanPath(std::vector<std::string>& paths)
this->SearchPathSuffixes.begin();
j != this->SearchPathSuffixes.end(); ++j)
{
- std::string p = *i + std::string("/") + *j;
+ // if *i is only / then do not add a //
+ // this will get incorrectly considered a network
+ // path on windows and cause huge delays.
+ std::string p = *i;
+ if(p.size() && p[p.size()-1] != '/')
+ {
+ p += std::string("/");
+ }
+ p += *j;
// add to all paths because the search path may be modified
// later with lib being replaced for lib64 which may exist
paths.push_back(p);