summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalGenerator.cxx4
-rw-r--r--Source/cmOrderLinkDirectories.cxx5
-rw-r--r--Source/cmOrderLinkDirectories.h6
-rw-r--r--Tests/Complex/Executable/complex.cxx2
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx2
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx2
6 files changed, 12 insertions, 9 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 890e905..84b4902 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1712,8 +1712,10 @@ void cmLocalGenerator
orderLibs.SetLinkTypeInformation(cmOrderLinkDirectories::LinkShared,
static_link_type_flag,
shared_link_type_flag);
- orderLibs.SetLinkPrefix(
+ orderLibs.AddLinkPrefix(
this->Makefile->GetDefinition("CMAKE_STATIC_LIBRARY_PREFIX"));
+ orderLibs.AddLinkPrefix(
+ this->Makefile->GetDefinition("CMAKE_SHARED_LIBRARY_PREFIX"));
orderLibs.AddLinkExtension(
this->Makefile->GetDefinition("CMAKE_STATIC_LIBRARY_SUFFIX"),
cmOrderLinkDirectories::LinkStatic);
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index ab3fe9c..fe00ec2 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -189,9 +189,10 @@ void cmOrderLinkDirectories::CreateRegularExpressions()
// be the library name. Match index 3 will be the library
// extension.
reg = "^(";
- if(!this->LinkPrefix.empty())
+ for(std::set<cmStdString>::iterator p = this->LinkPrefixes.begin();
+ p != this->LinkPrefixes.end(); ++p)
{
- reg += this->LinkPrefix;
+ reg += *p;
reg += "|";
}
reg += ")";
diff --git a/Source/cmOrderLinkDirectories.h b/Source/cmOrderLinkDirectories.h
index 0da6e85..a3bc75a 100644
--- a/Source/cmOrderLinkDirectories.h
+++ b/Source/cmOrderLinkDirectories.h
@@ -83,11 +83,11 @@ public:
}
}
// should be set from CMAKE_STATIC_LIBRARY_PREFIX
- void SetLinkPrefix(const char* s)
+ void AddLinkPrefix(const char* s)
{
if(s)
{
- this->LinkPrefix = s;
+ this->LinkPrefixes.insert(s);
}
}
// Return any warnings if the exist
@@ -164,7 +164,7 @@ private:
std::vector<cmStdString> SharedLinkExtensions;
std::vector<cmStdString> LinkExtensions;
// the names of link prefixes
- cmStdString LinkPrefix;
+ std::set<cmStdString> LinkPrefixes;
// set of directories that can not be put in the correct order
std::set<cmStdString> ImpossibleDirectories;
// Name of target
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 759cfd9..273e8a2 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -108,7 +108,7 @@ bool TestLibraryOrder(bool shouldFail)
orderLibs.DebugOn();
orderLibs.AddLinkExtension(".so");
orderLibs.AddLinkExtension(".a");
- orderLibs.SetLinkPrefix("lib");
+ orderLibs.AddLinkPrefix("lib");
cmTargetManifest manifest;
orderLibs.SetLinkInformation("test", linkLibraries, linkDirectories,
manifest, "");
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 759cfd9..273e8a2 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -108,7 +108,7 @@ bool TestLibraryOrder(bool shouldFail)
orderLibs.DebugOn();
orderLibs.AddLinkExtension(".so");
orderLibs.AddLinkExtension(".a");
- orderLibs.SetLinkPrefix("lib");
+ orderLibs.AddLinkPrefix("lib");
cmTargetManifest manifest;
orderLibs.SetLinkInformation("test", linkLibraries, linkDirectories,
manifest, "");
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 759cfd9..273e8a2 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -108,7 +108,7 @@ bool TestLibraryOrder(bool shouldFail)
orderLibs.DebugOn();
orderLibs.AddLinkExtension(".so");
orderLibs.AddLinkExtension(".a");
- orderLibs.SetLinkPrefix("lib");
+ orderLibs.AddLinkPrefix("lib");
cmTargetManifest manifest;
orderLibs.SetLinkInformation("test", linkLibraries, linkDirectories,
manifest, "");