diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-09-17 20:39:13 (GMT) |
---|---|---|
committer | unknown <rmaynard@nvidia.com> | 2021-10-20 15:18:06 (GMT) |
commit | 61b9764b03517276e99584de02d52ceefa5689ec (patch) | |
tree | 663e5dee6f66a2ef958002b209437b659ad02dca /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 3b5e1b53eae726bb4105240143354270df4495e3 (diff) | |
download | CMake-61b9764b03517276e99584de02d52ceefa5689ec.zip CMake-61b9764b03517276e99584de02d52ceefa5689ec.tar.gz CMake-61b9764b03517276e99584de02d52ceefa5689ec.tar.bz2 |
CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION
The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION`
now aren't mutually exclusive and can now be used together on the same
target.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index b792c03..4e93a4a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3211,18 +3211,17 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( // the default to not have any extension cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).obj"); - bool notPtx = true; if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) { cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true"); - } else if (this->GeneratorTarget->GetPropertyAsBool( - "CUDA_PTX_COMPILATION")) { + } + bool notPtx = 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; } - if (notPtx && cmSystemTools::VersionCompareGreaterEq( "8.0", this->GlobalGenerator->GetPlatformToolsetCudaString())) { |