summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-09 13:41:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-09 13:41:32 (GMT)
commit922482dd3acd2af9d26476134b3386c5a7695a03 (patch)
tree15397c092103ed6fc0190620b718a1bf0002357f /Source/cmLocalGenerator.cxx
parentd803d6b59f294b1bd1bd32beb75468399560be95 (diff)
parent2d7bb13da7ec13ce73facaff07847d75d8a20e91 (diff)
downloadCMake-922482dd3acd2af9d26476134b3386c5a7695a03.zip
CMake-922482dd3acd2af9d26476134b3386c5a7695a03.tar.gz
CMake-922482dd3acd2af9d26476134b3386c5a7695a03.tar.bz2
Merge topic 'cuda_resolve_device_symbols_on_static_lib_collect_deps_properly'
2d7bb13da7 CUDA: static lib device linking computes required static libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3748
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9152e94..25e4d01 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -14,6 +14,7 @@
#include "cmInstallScriptGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmLinkLineComputer.h"
+#include "cmLinkLineDeviceComputer.h"
#include "cmMakefile.h"
#include "cmRulePlaceholderExpander.h"
#include "cmSourceFile.h"
@@ -1153,6 +1154,12 @@ void cmLocalGenerator::GetTargetFlags(
switch (target->GetType()) {
case cmStateEnums::STATIC_LIBRARY:
this->GetStaticLibraryFlags(linkFlags, buildType, linkLanguage, target);
+ if (pcli && dynamic_cast<cmLinkLineDeviceComputer*>(linkLineComputer)) {
+ // Compute the required cuda device link libraries when
+ // resolving cuda device symbols
+ this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
+ frameworkPath, linkPath);
+ }
break;
case cmStateEnums::MODULE_LIBRARY:
libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS";