Merge topic 'cmComputeLinkInformation-minor-cleanup'
faede40b
cmComputeLinkInformation: Reduce 'if' nesting in AddItem
This commit is contained in:
commit
c1081a45d5
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue