VS: Add support for the CUDA_SEPARABLE_COMPILATION property

This commit is contained in:
Brad King
2017-03-07 16:23:57 -05:00
parent 94255511a6
commit 6ca4f22292

View File

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