summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmComputeLinkInformation.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 4958fee..3405546 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1626,7 +1626,13 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
for(std::vector<std::string>::const_iterator i = implicitLibVec.begin();
i != implicitLibVec.end(); ++i)
{
- this->ImplicitLinkLibs.insert(*i);
+ // Items starting in '-' but not '-l' are flags, not libraries,
+ // and should not be filtered by this implicit list.
+ std::string const& item = *i;
+ if(item[0] != '-' || item[1] == 'l')
+ {
+ this->ImplicitLinkLibs.insert(item);
+ }
}
}