diff options
author | Brad King <brad.king@kitware.com> | 2017-10-18 13:35:19 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-10-18 13:36:06 (GMT) |
commit | 0f23697eb0625c7c0eedbe46bbb98f62b6cd89c6 (patch) | |
tree | 52b97e88b08e1e894af05442e47e1c613249a1ce | |
parent | 1f436c5803660c599b1c263f9a4a6924d72474bf (diff) | |
parent | fd90a14f1b98b44dc29a27a46d44d4405a7b0faa (diff) | |
download | CMake-0f23697eb0625c7c0eedbe46bbb98f62b6cd89c6.zip CMake-0f23697eb0625c7c0eedbe46bbb98f62b6cd89c6.tar.gz CMake-0f23697eb0625c7c0eedbe46bbb98f62b6cd89c6.tar.bz2 |
Merge topic 'vs-cuda-machine'
fd90a14f VS: Set CUDA TargetMachinePlatform explicitly on x64
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1390
-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 0087957..c61902a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2648,6 +2648,13 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).ptx"); } + // CUDA automatically passes the proper '--machine' flag to nvcc + // for the current architecture, but does not reflect this default + // in the user-visible IDE settings. Set it explicitly. + if (this->Platform == "x64") { + cudaOptions.AddFlag("TargetMachinePlatform", "64"); + } + // Convert the host compiler options to the toolset's abstractions // using a secondary flag table. cudaOptions.ClearTables(); |