diff options
author | Brad King <brad.king@kitware.com> | 2017-03-07 21:23:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-10 15:19:57 (GMT) |
commit | 6ca4f2229234ab7543597ca19bda09c51297eee6 (patch) | |
tree | 72c016c912598b652ef700a4f9b5688de6eb41ee /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 94255511a6d59b14159544e2489905c62dab9fca (diff) | |
download | CMake-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.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(); |