From b017a02b901061223ba4cec9549a6b5df66f0d2e Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 18 Apr 2008 17:32:15 -0400 Subject: [PATCH] ENH: only complain about -l stuff for CMP0003 --- Source/cmComputeLinkInformation.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 878c3d64d..5e105371a 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);