diff options
author | Brad King <brad.king@kitware.com> | 2011-03-15 18:47:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-03-15 18:47:42 (GMT) |
commit | 3b6dbf71149c47e1e391e3e0663ae8476a7deaa9 (patch) | |
tree | 509e625f94abb2a1064d56991a0382b8a5464d8e | |
parent | 9349de14c7c25bc1341c813cb040d6c4fad03453 (diff) | |
parent | c9d55ae5b9dceb90c735df72b7c487d0a75b2b62 (diff) | |
download | CMake-3b6dbf71149c47e1e391e3e0663ae8476a7deaa9.zip CMake-3b6dbf71149c47e1e391e3e0663ae8476a7deaa9.tar.gz CMake-3b6dbf71149c47e1e391e3e0663ae8476a7deaa9.tar.bz2 |
Merge topic 'module-link-interface-issue-11945'
c9d55ae Add parens in cmTarget::ComputeLinkInterface logic
c6a8e4c The link interface of MODULE libraries is empty (#11945)
-rw-r--r-- | Source/cmTarget.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0ca46c4..7bd5372 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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; } |