summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-15 14:47:42 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2011-03-15 14:47:42 -0400
commit3b6dbf71149c47e1e391e3e0663ae8476a7deaa9 (patch)
tree509e625f94abb2a1064d56991a0382b8a5464d8e
parent9349de14c7c25bc1341c813cb040d6c4fad03453 (diff)
parentc9d55ae5b9dceb90c735df72b7c487d0a75b2b62 (diff)
downloadcmake-3b6dbf71149c47e1e391e3e0663ae8476a7deaa9.tar.gz
cmake-3b6dbf71149c47e1e391e3e0663ae8476a7deaa9.tar.xz
cmake-3b6dbf71149c47e1e391e3e0663ae8476a7deaa9.zip
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.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0ca46c448..7bd537236 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;
}