Преглед на файлове

Merge topic 'vs-fix-no-toolset'

0caca40f VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express
Brad King преди 9 години
родител
ревизия
fe03a86eb3
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  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()