summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.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/cmLocalGenerator.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/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 f0145c5..ee0d4da 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"
@@ -1152,6 +1153,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";