diff options
author | Brad King <brad.king@kitware.com> | 2019-07-10 13:20:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-10 13:20:32 (GMT) |
commit | 29a1a68e903640bd79483e4b6ba13bd93fe3a3f5 (patch) | |
tree | 29894ac939af81d18ab7bcc24917647102e05f32 /Source/cmLinkLineDeviceComputer.cxx | |
parent | 27bd921b38121fb6be54e8b200252c2914049dea (diff) | |
parent | 88954496488e5b41b599d580d8b673168295d841 (diff) | |
download | CMake-29a1a68e903640bd79483e4b6ba13bd93fe3a3f5.zip CMake-29a1a68e903640bd79483e4b6ba13bd93fe3a3f5.tar.gz CMake-29a1a68e903640bd79483e4b6ba13bd93fe3a3f5.tar.bz2 |
Merge topic 'cuda-imported-library-device-linking'
8895449648 CUDA: Restore device linking to imported static library targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3526
Diffstat (limited to 'Source/cmLinkLineDeviceComputer.cxx')
-rw-r--r-- | Source/cmLinkLineDeviceComputer.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index d27da3e..8d2add6 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -90,12 +90,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; |