summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-09 16:12:54 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-09 16:13:51 (GMT)
commit7ffa42288e4ce5a1f1c82ec2b661f81e6d6038ec (patch)
tree014de5b44323b2fddef34407abb1a14ac05125f5 /Source
parent68537b890ba155632b3679dc77c0e04148bf18d5 (diff)
parent071c4f1a2a44de1e3e9d2c5ce22a661edf334f8b (diff)
downloadCMake-7ffa42288e4ce5a1f1c82ec2b661f81e6d6038ec.zip
CMake-7ffa42288e4ce5a1f1c82ec2b661f81e6d6038ec.tar.gz
CMake-7ffa42288e4ce5a1f1c82ec2b661f81e6d6038ec.tar.bz2
Merge branch 'backport-3.15-cuda-device-link-only-cuda'
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index d845652..847334b 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -183,29 +183,29 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
return cmIsOn(resolveDeviceSymbols);
}
- if (const char* separableCompilation =
- target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
- if (cmIsOn(separableCompilation)) {
- bool doDeviceLinking = false;
- switch (target.GetType()) {
- case cmStateEnums::SHARED_LIBRARY:
- case cmStateEnums::MODULE_LIBRARY:
- case cmStateEnums::EXECUTABLE:
- doDeviceLinking = true;
- break;
- default:
- break;
- }
- return doDeviceLinking;
- }
- }
-
// Determine if we have any dependencies that require
// us to do a device link step
cmGeneratorTarget::LinkClosure const* closure =
target.GetLinkClosure(config);
if (cmContains(closure->Languages, "CUDA")) {
+ if (const char* separableCompilation =
+ target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
+ if (cmIsOn(separableCompilation)) {
+ bool doDeviceLinking = false;
+ switch (target.GetType()) {
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::EXECUTABLE:
+ doDeviceLinking = true;
+ break;
+ default:
+ break;
+ }
+ return doDeviceLinking;
+ }
+ }
+
cmComputeLinkInformation* pcli = target.GetLinkInformation(config);
if (pcli) {
cmLinkLineDeviceComputer deviceLinkComputer(