summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ef0fcf3..8926f9e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3597,13 +3597,13 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) {
cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true");
}
- bool notPtx = true;
+ bool notPtxLike = true;
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");
- notPtx = false;
+ notPtxLike = false;
if (cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL,
cudaVersion, "9.0") &&
@@ -3618,9 +3618,24 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
"%(BaseCommandLineTemplate) [CompileOut] [FastMath] "
"[Defines] \"%(FullPath)\"");
}
- }
-
- if (notPtx &&
+ } else if (this->GeneratorTarget->GetPropertyAsBool(
+ "CUDA_CUBIN_COMPILATION")) {
+ cudaOptions.AddFlag("NvccCompilation", "cubin");
+ cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).cubin");
+ notPtxLike = false;
+ } else if (this->GeneratorTarget->GetPropertyAsBool(
+ "CUDA_FATBIN_COMPILATION")) {
+ cudaOptions.AddFlag("NvccCompilation", "fatbin");
+ cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).fatbin");
+ notPtxLike = false;
+ } else if (this->GeneratorTarget->GetPropertyAsBool(
+ "CUDA_OPTIX_COMPILATION")) {
+ cudaOptions.AddFlag("NvccCompilation", "optix-ir");
+ cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).optixir");
+ notPtxLike = false;
+ }
+
+ if (notPtxLike &&
cmSystemTools::VersionCompareGreaterEq(
"8.0", this->GlobalGenerator->GetPlatformToolsetCudaString())) {
// Explicitly state that we want this file to be treated as a