summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
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