mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
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.
This commit is contained in:
1 parent
584ab5285b
commit
0caca40fcc
1 file changed
+5
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user