diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-06-09 19:49:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-13 13:15:19 (GMT) |
commit | 7368ade2502a347b18c47fc175b67c1d0f594744 (patch) | |
tree | db6b9b38c927a6fe2d2e3fbc63d3082cf7c1a1d2 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | d025faf436c86ee9cc033fbb324a9bc2c18757fa (diff) | |
download | CMake-7368ade2502a347b18c47fc175b67c1d0f594744.zip CMake-7368ade2502a347b18c47fc175b67c1d0f594744.tar.gz CMake-7368ade2502a347b18c47fc175b67c1d0f594744.tar.bz2 |
CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings
The CUDA compiler automatic deprecation warnings are pure noise when
doing device linking, and should be suppressed to reduce the amount of
confusion from users.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 46c2894..29a06b7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2591,6 +2591,13 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions( cudaLinkOptions.AddFlag("PerformDeviceLink", doDeviceLinking ? "true" : "false"); + // Suppress deprecation warnings for default GPU targets during device link. + if (cmSystemTools::VersionCompareGreaterEq( + this->GlobalGenerator->GetPlatformToolsetCudaString(), "8.0")) { + cudaLinkOptions.AppendFlag("AdditionalOptions", + "-Wno-deprecated-gpu-targets"); + } + this->CudaLinkOptions[configName] = pOptions.release(); return true; } |