summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-01 17:16:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-05-01 17:16:09 (GMT)
commitc1081a45d52598e6000341595d138048d5b79fc2 (patch)
tree34f44905c53bfc7a11f4114c157bf58affa311c2
parent59edc038d59b5898ee1d8baeab6e10d7f897c31e (diff)
parentfaede40b46dee698d091e80b8c4658a70a1eb326 (diff)
downloadCMake-c1081a45d52598e6000341595d138048d5b79fc2.zip
CMake-c1081a45d52598e6000341595d138048d5b79fc2.tar.gz
CMake-c1081a45d52598e6000341595d138048d5b79fc2.tar.bz2
Merge topic 'cmComputeLinkInformation-minor-cleanup'
faede40b cmComputeLinkInformation: Reduce 'if' nesting in AddItem
-rw-r--r--Source/cmComputeLinkInformation.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 83d38ef..6ecf0dc 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -653,6 +653,13 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
this->Items.push_back(Item(linkItem, true, tgt));
this->Depends.push_back(exe);
}
+ else if(tgt->GetType() == cmTarget::INTERFACE_LIBRARY)
+ {
+ // Add the interface library as an item so it can be considered as part
+ // of COMPATIBLE_INTERFACE_ enforcement. The generators will ignore
+ // this for the actual link line.
+ this->Items.push_back(Item(std::string(), true, tgt));
+ }
else
{
// Decide whether to use an import library.
@@ -660,11 +667,6 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
(this->UseImportLibrary &&
(impexe || tgt->GetType() == cmTarget::SHARED_LIBRARY));
- if(tgt->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- this->Items.push_back(Item(std::string(), true, tgt));
- return;
- }
// Pass the full path to the target file.
std::string lib = tgt->GetFullPath(config, implib, true);
if(!this->LinkDependsNoShared ||