diff options
author | Brad King <brad.king@kitware.com> | 2006-02-09 22:29:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-09 22:29:58 (GMT) |
commit | e31f93ea3fbf71c0bfcce168dbed9d9c0ff22029 (patch) | |
tree | 582c5e1d28c9f3ad5d71a3e80f6334f6dd8b2780 | |
parent | 3f978317b73800080fd100a884a8fa55ddcf6417 (diff) | |
download | CMake-e31f93ea3fbf71c0bfcce168dbed9d9c0ff22029.zip CMake-e31f93ea3fbf71c0bfcce168dbed9d9c0ff22029.tar.gz CMake-e31f93ea3fbf71c0bfcce168dbed9d9c0ff22029.tar.bz2 |
BUG: Deal with case insensitivity on windows linker paths. Also fixed spelling typo.
-rw-r--r-- | Source/cmOrderLinkDirectories.cxx | 19 | ||||
-rw-r--r-- | Source/cmOrderLinkDirectories.h | 2 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx index b3362ef..add18d7 100644 --- a/Source/cmOrderLinkDirectories.cxx +++ b/Source/cmOrderLinkDirectories.cxx @@ -212,7 +212,7 @@ void cmOrderLinkDirectories::OrderPaths(std::vector<cmStdString>& = m_DirectoryToAfterList.begin(); i != m_DirectoryToAfterList.end(); ++i) { - m_ImposibleDirectories.insert(i->first); + m_ImpossibleDirectories.insert(i->first); // still put it in the path list in the order we find them orderedPaths.push_back(i->first); } @@ -297,6 +297,17 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder() { cmSystemTools::SplitProgramPath(m_RawLinkItems[i].c_str(), dir, file); +#ifdef _WIN32 + // Avoid case problems for windows paths. + if(dir.size() > 2 && dir[1] == ':') + { + if(dir[0] >= 'A' && dir[0] <= 'Z') + { + dir[0] += 'a' - 'A'; + } + } + dir = cmSystemTools::GetActualCaseForPath(dir.c_str()); +#endif m_DirectoryToAfterList[dir] = empty; m_LinkPathSet.insert(dir); aLib.FullPath = m_RawLinkItems[i]; @@ -336,7 +347,7 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder() // now turn libfoo.a into foo and foo.a into foo // This will prepare the link items for -litem this->PrepareLinkTargets(); - if(m_ImposibleDirectories.size()) + if(m_ImpossibleDirectories.size()) { cmSystemTools::Message(this->GetWarnings().c_str()); return false; @@ -347,8 +358,8 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder() std::string cmOrderLinkDirectories::GetWarnings() { std::string warning = "It is impossible to order the linker search path in such a way that libraries specified as full paths will be picked by the linker.\nDirectories and libraries involved are:\n"; - for(std::set<cmStdString>::iterator i = m_ImposibleDirectories.begin(); - i != m_ImposibleDirectories.end(); ++i) + for(std::set<cmStdString>::iterator i = m_ImpossibleDirectories.begin(); + i != m_ImpossibleDirectories.end(); ++i) { warning += "Directory: "; warning += *i; diff --git a/Source/cmOrderLinkDirectories.h b/Source/cmOrderLinkDirectories.h index 88f6e16..3a82a19 100644 --- a/Source/cmOrderLinkDirectories.h +++ b/Source/cmOrderLinkDirectories.h @@ -137,7 +137,7 @@ private: // the names of link prefixes cmStdString m_LinkPrefix; // set of directories that can not be put in the correct order - std::set<cmStdString> m_ImposibleDirectories; + std::set<cmStdString> m_ImpossibleDirectories; // Name of target cmStdString m_TargetName; // library regular expressions |