From d5cf644ac2e3f035d2d3413dd98aa0d46f9f27eb Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 1 Nov 2012 10:16:56 +0100 Subject: Split link information processing into two steps. The first step can be ported to use the generator expression API, while the second can not. This is for compatibility with CMP0003. --- Source/cmTarget.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 7c62ea8..214b099 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4707,14 +4707,24 @@ void cmTarget::ComputeLinkImplementation(const char* config, { continue; } - if(li->second == cmTarget::GENERAL || li->second == linkType) { // The entry is meant for this configuration. impl.Libraries.push_back(item); } - else + } + + LinkLibraryVectorType const& oldllibs = this->GetOriginalLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator li = oldllibs.begin(); + li != oldllibs.end(); ++li) + { + if(li->second != cmTarget::GENERAL && li->second != linkType) { + std::string item = this->CheckCMP0004(li->first); + if(item == this->GetName() || item.empty()) + { + continue; + } // Support OLD behavior for CMP0003. impl.WrongConfigLibraries.push_back(item); } -- cgit v0.12