summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-07 21:23:57 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-10 15:19:57 (GMT)
commit6ca4f2229234ab7543597ca19bda09c51297eee6 (patch)
tree72c016c912598b652ef700a4f9b5688de6eb41ee /Source/cmVisualStudio10TargetGenerator.cxx
parent94255511a6d59b14159544e2489905c62dab9fca (diff)
downloadCMake-6ca4f2229234ab7543597ca19bda09c51297eee6.zip
CMake-6ca4f2229234ab7543597ca19bda09c51297eee6.tar.gz
CMake-6ca4f2229234ab7543597ca19bda09c51297eee6.tar.bz2
VS: Add support for the CUDA_SEPARABLE_COMPILATION property
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
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();