Merge topic 'vs-cuda-machine'

fd90a14f VS: Set CUDA TargetMachinePlatform explicitly on x64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1390
This commit is contained in:
Brad King
2017-10-18 13:35:19 +00:00
committed by Kitware Robot

View File

@@ -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();