summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-22 14:29:49 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-22 14:30:00 (GMT)
commitfc4cbbc2a5f9f7d38e77c991a88400b29c39f182 (patch)
tree82f9614ac1585e57dd33dbae87639af927db2613 /Source/cmVisualStudio10TargetGenerator.cxx
parentc024e44abea66e37fefe358659d70d8811dd73c8 (diff)
parent81b4d10d8f421242f9989ff0c2d37a12be66f405 (diff)
downloadCMake-fc4cbbc2a5f9f7d38e77c991a88400b29c39f182.zip
CMake-fc4cbbc2a5f9f7d38e77c991a88400b29c39f182.tar.gz
CMake-fc4cbbc2a5f9f7d38e77c991a88400b29c39f182.tar.bz2
Merge topic 'remove_unneeded_device_link_calls'
81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking 3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3320
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index af90383..d328a8c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -10,6 +10,7 @@
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalVisualStudio10Generator.h"
+#include "cmLinkLineDeviceComputer.h"
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
@@ -3007,21 +3008,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
Options& cudaLinkOptions = *pOptions;
// Determine if we need to do a device link
- bool doDeviceLinking = false;
- if (const char* resolveDeviceSymbols =
- this->GeneratorTarget->GetProperty("CUDA_RESOLVE_DEVICE_SYMBOLS")) {
- doDeviceLinking = cmSystemTools::IsOn(resolveDeviceSymbols);
- } else {
- switch (this->GeneratorTarget->GetType()) {
- case cmStateEnums::SHARED_LIBRARY:
- case cmStateEnums::MODULE_LIBRARY:
- case cmStateEnums::EXECUTABLE:
- doDeviceLinking = true;
- break;
- default:
- break;
- }
- }
+ bool doDeviceLinking = requireDeviceLinking(
+ *this->GeneratorTarget, *this->LocalGenerator, configName);
cudaLinkOptions.AddFlag("PerformDeviceLink",
doDeviceLinking ? "true" : "false");