summaryrefslogtreecommitdiffstats
path: root/Source/cmOrderLinkDirectories.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-04-08 16:46:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-04-08 16:46:56 (GMT)
commitba58264abe0ce3274c593180d41c58a23d99d694 (patch)
treec60912593057e913f7bc9f59f994a00650a176f0 /Source/cmOrderLinkDirectories.cxx
parenta5be6b84067dc3fcc10088e5d003610f46d2b1f5 (diff)
downloadCMake-ba58264abe0ce3274c593180d41c58a23d99d694.zip
CMake-ba58264abe0ce3274c593180d41c58a23d99d694.tar.gz
CMake-ba58264abe0ce3274c593180d41c58a23d99d694.tar.bz2
BUG: handle case insensitive library extensions on windows
Diffstat (limited to 'Source/cmOrderLinkDirectories.cxx')
-rw-r--r--Source/cmOrderLinkDirectories.cxx29
1 files changed, 28 insertions, 1 deletions
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index 5c98b82..5082b8f 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -1,7 +1,7 @@
#include "cmOrderLinkDirectories.h"
#include "cmSystemTools.h"
#include "cmsys/RegularExpression.hxx"
-
+#include <ctype.h>
//-------------------------------------------------------------------
@@ -79,6 +79,29 @@ void cmOrderLinkDirectories::FindIndividualLibraryOrders()
}
//-------------------------------------------------------------------
+std::string cmOrderLinkDirectories::NoCaseExpression(const char* str)
+{
+ std::string ret;
+ const char* s = str;
+ while(*s)
+ {
+ if(*s == '.')
+ {
+ ret += *s;
+ }
+ else
+ {
+ ret += "[";
+ ret += tolower(*s);
+ ret += toupper(*s);
+ ret += "]";
+ }
+ s++;
+ }
+ return ret;
+}
+
+//-------------------------------------------------------------------
void cmOrderLinkDirectories::CreateRegularExpressions()
{
cmStdString libext = "(";
@@ -92,7 +115,11 @@ void cmOrderLinkDirectories::CreateRegularExpressions()
}
first = false;
libext += "\\";
+#ifndef _WIN32
libext += *i;
+#else
+ libext += this->NoCaseExpression(i->c_str());
+#endif
}
libext += ").*";
cmStdString reg("(.*)");