summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-17 14:47:14 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-17 14:47:14 (GMT)
commit069c1bd908aeae6263fdb735b76760cd9dad67a7 (patch)
treec10cbcf186acb8824f4902ada8b52f544b76cd0e
parent5a25bda524f004c4b2b954b38c2898094cdb83a4 (diff)
parentfd90a14f1b98b44dc29a27a46d44d4405a7b0faa (diff)
downloadCMake-069c1bd908aeae6263fdb735b76760cd9dad67a7.zip
CMake-069c1bd908aeae6263fdb735b76760cd9dad67a7.tar.gz
CMake-069c1bd908aeae6263fdb735b76760cd9dad67a7.tar.bz2
Merge branch 'vs-cuda-machine' into release-3.10
Merge-request: !1390
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
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();