summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 878c3d6..5e10537 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1187,7 +1187,11 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item)
}
else if(item[0] == '-' || item[0] == '$' || item[0] == '`')
{
- if(item.find("-framework") != 0)
+ // if this is a -l option then we might need to warn about
+ // CMP0003 so put it in OldUserFlagItems, if it is not a -l
+ // or -Wl,-l (-framework -pthread), then allow it without a
+ // CMP0003 as -L will not affect those other linker flags
+ if(item.find("-l") == 0 || item.find("-Wl,-l") == 0)
{
// This is a linker option provided by the user.
this->OldUserFlagItems.push_back(item);