summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-09-28 10:40:14 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2001-09-28 10:40:14 -0400
commit9ae8234fe5c1fd3b46bc4c89b09ed6342c18b43c (patch)
tree5faa371b73135b263c96214cb4e4eb52cc14ff96
parentd9e38b32c3ad47ee47f18b52b4321c37d2143c3e (diff)
downloadcmake-9ae8234fe5c1fd3b46bc4c89b09ed6342c18b43c.tar.gz
BUG: get correct library name
-rw-r--r--Source/cmSystemTools.cxx8
-rw-r--r--Source/cmUnixMakefileGenerator.cxx4
2 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index d9a20a99ca..565e8fe974 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1199,10 +1199,14 @@ std::string cmSystemTools::CollapseFullPath(const char* in_name)
# ifdef MAXPATHLEN
char resolved_name[MAXPATHLEN];
# else
+# ifdef PATH_MAX
char resolved_name[PATH_MAX];
+# else
+ char resolved_name[5024];
+# endif
# endif
- realpath(in_name, resolved_name);
- return resolved_name;
+ realpath(in_name, resolved_name);
+ return resolved_name;
#endif
}
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index b1bd7db1b9..5808abceb2 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -450,8 +450,8 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
runtimeDirs.push_back( libpath );
}
}
- cmRegularExpression libname("lib([^.]*)\\.(.*)");
- cmRegularExpression libname_noprefix("([^.]*)\\.(.*)");
+ cmRegularExpression libname("lib(.*)(\\.so|\\.sl|\\.a|\\.dylib).*");
+ cmRegularExpression libname_noprefix("(.*)(\\.so|\\.sl|\\.a|\\.dylib).*");
if(libname.find(file))
{
librariesLinked += "-l";