summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-21 12:57:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-21 12:57:59 (GMT)
commit1d8f0f918178c50e8ef66b01546f34cd2a126a6d (patch)
tree04d8830fb1d4b5338e9afabcb8ac3b4bb134fb05 /Source/cmVisualStudio10TargetGenerator.cxx
parent0ad8e4ea658ed992841c81dca2c5eb31abc40983 (diff)
parent23691d789e198c228e5c2bb7016b3b1194fd0635 (diff)
downloadCMake-1d8f0f918178c50e8ef66b01546f34cd2a126a6d.zip
CMake-1d8f0f918178c50e8ef66b01546f34cd2a126a6d.tar.gz
CMake-1d8f0f918178c50e8ef66b01546f34cd2a126a6d.tar.bz2
Merge topic 'enable_ptx_compilation'
23691d78 CUDA: Allow sources to be compiled to .ptx files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !725
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index adf5f74..d83662e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2467,6 +2467,12 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) {
cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true");
+ } else if (this->GeneratorTarget->GetPropertyAsBool(
+ "CUDA_PTX_COMPILATION")) {
+ cudaOptions.AddFlag("NvccCompilation", "ptx");
+ // We drop the %(Extension) component as CMake expects all PTX files
+ // to not have the source file extension at all
+ cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).ptx");
}
// Convert the host compiler options to the toolset's abstractions