diff options
author | Brad King <brad.king@kitware.com> | 2015-05-01 17:16:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-01 17:16:09 (GMT) |
commit | c1081a45d52598e6000341595d138048d5b79fc2 (patch) | |
tree | 34f44905c53bfc7a11f4114c157bf58affa311c2 | |
parent | 59edc038d59b5898ee1d8baeab6e10d7f897c31e (diff) | |
parent | faede40b46dee698d091e80b8c4658a70a1eb326 (diff) | |
download | CMake-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.cxx | 12 |
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 || |