Merge topic 'module-link-interface-issue-11945'

c9d55ae Add parens in cmTarget::ComputeLinkInterface logic
c6a8e4c The link interface of MODULE libraries is empty (#11945)
This commit is contained in:
Brad King 2011-03-15 14:47:42 -04:00 committed by CMake Topic Stage
commit 3b6dbf7114
1 changed files with 7 additions and 3 deletions

View File

@ -4317,9 +4317,13 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
}
}
// There is no implicit link interface for executables, so if none
// was explicitly set, there is no link interface.
if(!explicitLibraries && this->GetType() == cmTarget::EXECUTABLE)
// There is no implicit link interface for executables or modules
// so if none was explicitly set then there is no link interface.
// Note that CMake versions 2.2 and below allowed linking to modules.
bool canLinkModules = this->Makefile->NeedBackwardsCompatibility(2,2);
if(!explicitLibraries &&
(this->GetType() == cmTarget::EXECUTABLE ||
(this->GetType() == cmTarget::MODULE_LIBRARY && !canLinkModules)))
{
return false;
}