diff options
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 5ffa55c..fc59660 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2470,6 +2470,10 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.Parse(defineFlags.c_str()); cudaOptions.ParseFinish(); + if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) { + cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true"); + } + // Convert the host compiler options to the toolset's abstractions // using a secondary flag table. cudaOptions.ClearTables(); |