summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-04 19:18:10 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-04 19:18:10 (GMT)
commit6676286784c0c8edb56606e9d295e9c0f443d824 (patch)
tree62d0d868237a8fa62786d8909c5a99369cc82387
parent1e8914ada8834a9ed6e3a10a8575c14947df157e (diff)
downloadCMake-6676286784c0c8edb56606e9d295e9c0f443d824.zip
CMake-6676286784c0c8edb56606e9d295e9c0f443d824.tar.gz
CMake-6676286784c0c8edb56606e9d295e9c0f443d824.tar.bz2
ENH: When a full path to a library cannot be parsed, just add the whole path to the link line. If it isn't a valid path, the linker will complain.
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index de20907..3c5c7cc 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -555,6 +555,7 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
cmRegularExpression libname_noprefix("([^/]*)(\\.so|\\.lib|\\.dll|\\.sl|\\.a|\\.dylib).*");
if(libname.find(file))
{
+ // Library had "lib" prefix.
librariesLinked += libLinkFlag;
file = libname.match(1);
librariesLinked += file;
@@ -566,6 +567,7 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
}
else if(libname_noprefix.find(file))
{
+ // Library had no "lib" prefix.
librariesLinked += libLinkFlag;
file = libname_noprefix.match(1);
librariesLinked += file;
@@ -575,6 +577,13 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
}
librariesLinked += " ";
}
+ else
+ {
+ // Error parsing the library name. Just use the full path.
+ // The linker will give an error if it is invalid.
+ librariesLinked += lib->first;
+ librariesLinked += " ";
+ }
}
// not a full path, so add -l name
else