diff options
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 08378eb..fde214d 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -526,6 +526,13 @@ void cmVisualStudio10TargetGenerator::Generate() } e1.Element("TargetFrameworkTargetsVersion", targetFrameworkVer); } + if (!this->GlobalGenerator->GetPlatformToolsetCudaCustomDirString() + .empty()) { + e1.Element( + "CudaToolkitCustomDir", + this->GlobalGenerator->GetPlatformToolsetCudaCustomDirString() + + "nvcc"); + } } // Disable the project upgrade prompt that is displayed the first time a @@ -612,10 +619,17 @@ void cmVisualStudio10TargetGenerator::Generate() e1.SetHasElements(); if (this->GlobalGenerator->IsCudaEnabled()) { + auto customDir = + this->GlobalGenerator->GetPlatformToolsetCudaCustomDirString(); + std::string cudaPath = customDir.empty() + ? "$(VCTargetsPath)\\BuildCustomizations\\" + : customDir + + "CUDAVisualStudioIntegration\\extras\\" + "visual_studio_integration\\MSBuildExtensions\\"; Elem(e1, "Import") .Attribute("Project", - "$(VCTargetsPath)\\BuildCustomizations\\CUDA " + - this->GlobalGenerator->GetPlatformToolsetCudaString() + + std::move(cudaPath) + "CUDA " + + this->GlobalGenerator->GetPlatformToolsetCuda() + ".props"); } if (this->GlobalGenerator->IsMasmEnabled()) { @@ -698,10 +712,17 @@ void cmVisualStudio10TargetGenerator::Generate() e1.SetHasElements(); this->WriteTargetsFileReferences(e1); if (this->GlobalGenerator->IsCudaEnabled()) { + auto customDir = + this->GlobalGenerator->GetPlatformToolsetCudaCustomDirString(); + std::string cudaPath = customDir.empty() + ? "$(VCTargetsPath)\\BuildCustomizations\\" + : customDir + + "CUDAVisualStudioIntegration\\extras\\" + "visual_studio_integration\\MSBuildExtensions\\"; Elem(e1, "Import") .Attribute("Project", - "$(VCTargetsPath)\\BuildCustomizations\\CUDA " + - this->GlobalGenerator->GetPlatformToolsetCudaString() + + std::move(cudaPath) + "CUDA " + + this->GlobalGenerator->GetPlatformToolsetCuda() + ".targets"); } if (this->GlobalGenerator->IsMasmEnabled()) { |