diff options
author | Brad King <brad.king@kitware.com> | 2017-06-26 14:22:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-27 13:08:50 (GMT) |
commit | bbc1f3642cb86ce59908ee33eeb409d7921f73f8 (patch) | |
tree | c7d460c116f70f0f37d08532b849236eceb66293 /Source | |
parent | 3b75421515835b2fc6713be3015cc3f7324bb5a8 (diff) | |
download | CMake-bbc1f3642cb86ce59908ee33eeb409d7921f73f8.zip CMake-bbc1f3642cb86ce59908ee33eeb409d7921f73f8.tar.gz CMake-bbc1f3642cb86ce59908ee33eeb409d7921f73f8.tar.bz2 |
VS: Fix support for nvcc flags not in our flag table
The change in commit v3.9.0-rc4~3^2 (VS: Improve workaround for CUDA
-Xcompiler placement bug, 2017-06-21) accidentally appended to the
`AdditionalOptions` as if it were a `;`-separated list, but it is
actually a command-line string. Append with a space instead.
While at it, fix the same problem for the `AdditionalOptions` added to
`CudaLink` by commit v3.9.0-rc3~1^2 (CUDA: When linking device code
suppress CUDA 8.0+ deprecation warnings, 2017-06-09).
Fixes: #17008
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 32ece3f..67c02b2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2530,7 +2530,7 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.RemoveFlag("AdditionalCompilerOptions"); if (!aco.empty()) { aco = this->LocalGenerator->EscapeForShell(aco, false); - cudaOptions.AppendFlag("AdditionalOptions", "-Xcompiler=" + aco); + cudaOptions.AppendFlagString("AdditionalOptions", "-Xcompiler=" + aco); } } @@ -2619,8 +2619,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions( // 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"); + cudaLinkOptions.AppendFlagString("AdditionalOptions", + "-Wno-deprecated-gpu-targets"); } this->CudaLinkOptions[configName] = pOptions.release(); |