mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'remove_unneeded_device_link_calls'
81b4d10d8fCUDA: More exhaustive checks to determine when to do device linking3205c7c950cmNinjaLinkLineDeviceComputer now lives in the correct source file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3320
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user