summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx27
1 files changed, 25 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 74d8135..d33c763 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -263,8 +263,8 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
bcDir = this->VCTargetsPath + "/BuildCustomizations";
} else {
bcDir = this->GetPlatformToolsetCudaCustomDirString() +
- "CUDAVisualStudioIntegration\\extras\\"
- "visual_studio_integration\\MSBuildExtensions";
+ this->GetPlatformToolsetCudaVSIntegrationSubdirString() +
+ "extras\\visual_studio_integration\\MSBuildExtensions";
cmSystemTools::ConvertToUnixSlashes(bcDir);
}
cmsys::Glob gl;
@@ -470,6 +470,17 @@ bool cmGlobalVisualStudio10Generator::ProcessGeneratorToolsetField(
if (this->GeneratorToolsetCudaCustomDir.back() != '\\') {
this->GeneratorToolsetCudaCustomDir.push_back('\\');
}
+ /* check for legacy toolkit folder structure */
+ if (cmsys::SystemTools::FileIsDirectory(
+ cmStrCat(this->GeneratorToolsetCudaCustomDir, "nvcc"))) {
+ this->GeneratorToolsetCudaNvccSubdir = "nvcc\\";
+ }
+ if (cmsys::SystemTools::FileIsDirectory(
+ cmStrCat(this->GeneratorToolsetCudaCustomDir,
+ "CUDAVisualStudioIntegration"))) {
+ this->GeneratorToolsetCudaVSIntegrationSubdir =
+ "CUDAVisualStudioIntegration\\";
+ }
} else {
this->GeneratorToolsetCuda = value;
}
@@ -787,6 +798,18 @@ cmGlobalVisualStudio10Generator::GetPlatformToolsetCudaCustomDirString() const
return this->GeneratorToolsetCudaCustomDir;
}
+std::string const&
+cmGlobalVisualStudio10Generator::GetPlatformToolsetCudaNvccSubdirString() const
+{
+ return this->GeneratorToolsetCudaNvccSubdir;
+}
+
+std::string const& cmGlobalVisualStudio10Generator::
+ GetPlatformToolsetCudaVSIntegrationSubdirString() const
+{
+ return this->GeneratorToolsetCudaVSIntegrationSubdir;
+}
+
cmGlobalVisualStudio10Generator::AuxToolset
cmGlobalVisualStudio10Generator::FindAuxToolset(std::string&,
std::string&) const