summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-27 14:39:06 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-27 14:42:36 (GMT)
commit0caca40fccead726db6c4d5f5b4ea990958914df (patch)
treea21e81c05dadb759b4502b87d711c3e2e0ad60d4 /Source/cmGlobalVisualStudio10Generator.cxx
parent584ab5285b51945e0dd523caf77342985ac97ce4 (diff)
downloadCMake-0caca40fccead726db6c4d5f5b4ea990958914df.zip
CMake-0caca40fccead726db6c4d5f5b4ea990958914df.tar.gz
CMake-0caca40fccead726db6c4d5f5b4ea990958914df.tar.bz2
VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express
Refactoring in commit 584ab528 (VS: Add internal API to get platform toolset as string, 2016-10-18) accidentally changed the semantics of the original `cmGlobalVisualStudio10Generator::GetPlatformToolset` implementation to return a pointer to an empty string instead of `nullptr` when no toolset is configured. This broke cases that tested for `nullptr` to detect the lack of any specific toolset, such as the call in `Find64BitTools`. Restore the `nullptr` return in this case.
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 793c605..5c010b4 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -339,7 +339,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()