summaryrefslogtreecommitdiff
path: root/Source/cmLinkLineDeviceComputer.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-07-08 09:41:31 -0400
committerBrad King <brad.king@kitware.com>2019-07-09 11:13:41 -0400
commit88954496488e5b41b599d580d8b673168295d841 (patch)
tree246a7cd1c2c5400662bfbf1c42a5b3d3ff0bda92 /Source/cmLinkLineDeviceComputer.cxx
parent753373579e3dd8cf19f0fc18f4d9bec43a2d82e8 (diff)
downloadcmake-88954496488e5b41b599d580d8b673168295d841.tar.gz
CUDA: Restore device linking to imported static library targets
This ability was lost in commit 81b4d10d8f (CUDA: More exhaustive checks to determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2) and needs to be restored to use imported static libraries that have CUDA symbols.
Diffstat (limited to 'Source/cmLinkLineDeviceComputer.cxx')
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 6cfe5bb3c3..37dd895675 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -89,12 +89,17 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
}
if (item.Target) {
- bool skip = true;
- if (item.Target->GetType() == cmStateEnums::STATIC_LIBRARY) {
- if ((!item.Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS")) &&
- item.Target->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) {
- skip = false;
- }
+ bool skip = false;
+ switch (item.Target->GetType()) {
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::INTERFACE_LIBRARY:
+ skip = true;
+ break;
+ case cmStateEnums::STATIC_LIBRARY:
+ skip = item.Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS");
+ break;
+ default:
+ break;
}
if (skip) {
continue;