Browse Source

Merge topic 'vs-fix-no-toolset'

0caca40f VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express
Brad King 9 years ago
parent
commit
fe03a86eb3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/cmGlobalVisualStudio10Generator.cxx

+ 5 - 1
Source/cmGlobalVisualStudio10Generator.cxx

@@ -349,7 +349,11 @@ void cmGlobalVisualStudio10Generator::EnableLanguage(
 
 const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const
 {
-  return this->GetPlatformToolsetString().c_str();
+  std::string const& toolset = this->GetPlatformToolsetString();
+  if (toolset.empty()) {
+    return CM_NULLPTR;
+  }
+  return toolset.c_str();
 }
 
 std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString()