summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineDeviceComputer.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-08-27 17:52:55 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2019-09-05 14:51:02 (GMT)
commit2d7bb13da7ec13ce73facaff07847d75d8a20e91 (patch)
tree5f82719ebe153140ea44c93a1c6b7a49c1062be9 /Source/cmLinkLineDeviceComputer.cxx
parent09032f09f8d2b4f7af658060ef434083f9d6a0d4 (diff)
downloadCMake-2d7bb13da7ec13ce73facaff07847d75d8a20e91.zip
CMake-2d7bb13da7ec13ce73facaff07847d75d8a20e91.tar.gz
CMake-2d7bb13da7ec13ce73facaff07847d75d8a20e91.tar.bz2
CUDA: static lib device linking computes required static libs
Previously the CMake didn't compute the required set of libraries needed to properly device link a static library when CUDA_RESOLVE_DEVICE_SYMBOLS was enabled.
Diffstat (limited to 'Source/cmLinkLineDeviceComputer.cxx')
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 9c0e20f..1a602ca 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -82,6 +82,9 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
ItemVector const& items = cli.GetItems();
std::string config = cli.GetConfig();
bool skipItemAfterFramework = false;
+ // Note:
+ // Any modification of this algorithm should be reflected also in
+ // cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions
for (auto const& item : items) {
if (skipItemAfterFramework) {
skipItemAfterFramework = false;
@@ -91,6 +94,7 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
if (item.Target) {
bool skip = false;
switch (item.Target->GetType()) {
+ case cmStateEnums::SHARED_LIBRARY:
case cmStateEnums::MODULE_LIBRARY:
case cmStateEnums::INTERFACE_LIBRARY:
skip = true;