mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
VS: Restore Windows SDK selection with platform in generator name
Refactoring in commit e259063b0a (VS: Defer Windows SDK selection until
CMAKE_GENERATOR_PLATFORM is known, 2023-03-31, v3.27.0-rc1~206^2~5)
accidentally dropped the Windows SDK selection code path for VS
generators named with the old-style platform suffix.
Fixes: #25007
This commit is contained in:
@@ -117,10 +117,6 @@ bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p,
|
|||||||
*targetFrameworkTargetsVersion);
|
*targetFrameworkTargetsVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->InitializePlatform(mf)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The generator name does not contain the platform name, and so supports
|
// The generator name does not contain the platform name, and so supports
|
||||||
// explicit platform specification. We handled that above, so pass an
|
// explicit platform specification. We handled that above, so pass an
|
||||||
// empty platform name to our base class implementation so it does not error.
|
// empty platform name to our base class implementation so it does not error.
|
||||||
@@ -206,11 +202,6 @@ bool cmGlobalVisualStudio8Generator::ProcessGeneratorPlatformField(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmGlobalVisualStudio8Generator::InitializePlatform(cmMakefile*)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cm::optional<std::string> const&
|
cm::optional<std::string> const&
|
||||||
cmGlobalVisualStudio8Generator::GetTargetFrameworkVersion() const
|
cmGlobalVisualStudio8Generator::GetTargetFrameworkVersion() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ protected:
|
|||||||
cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
|
cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
|
||||||
std::string const& platformInGeneratorName);
|
std::string const& platformInGeneratorName);
|
||||||
|
|
||||||
virtual bool InitializePlatform(cmMakefile* mf);
|
|
||||||
|
|
||||||
virtual bool ProcessGeneratorPlatformField(std::string const& key,
|
virtual bool ProcessGeneratorPlatformField(std::string const& key,
|
||||||
std::string const& value);
|
std::string const& value);
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ void cmGlobalVisualStudioGenerator::EnableLanguage(
|
|||||||
bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p,
|
bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p,
|
||||||
cmMakefile* mf)
|
cmMakefile* mf)
|
||||||
{
|
{
|
||||||
|
if (!this->InitializePlatform(mf)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this->GetPlatformName() == "x64") {
|
if (this->GetPlatformName() == "x64") {
|
||||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||||
} else if (this->GetPlatformName() == "Itanium") {
|
} else if (this->GetPlatformName() == "Itanium") {
|
||||||
@@ -84,6 +87,11 @@ bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p,
|
|||||||
return this->cmGlobalGenerator::SetGeneratorPlatform(p, mf);
|
return this->cmGlobalGenerator::SetGeneratorPlatform(p, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmGlobalVisualStudioGenerator::InitializePlatform(cmMakefile*)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const
|
std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const
|
||||||
{
|
{
|
||||||
if (!this->GeneratorPlatform.empty()) {
|
if (!this->GeneratorPlatform.empty()) {
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ protected:
|
|||||||
cmGlobalVisualStudioGenerator(cmake* cm,
|
cmGlobalVisualStudioGenerator(cmake* cm,
|
||||||
std::string const& platformInGeneratorName);
|
std::string const& platformInGeneratorName);
|
||||||
|
|
||||||
|
virtual bool InitializePlatform(cmMakefile* mf);
|
||||||
|
|
||||||
void AddExtraIDETargets() override;
|
void AddExtraIDETargets() override;
|
||||||
|
|
||||||
// Does this VS version link targets to each other if there are
|
// Does this VS version link targets to each other if there are
|
||||||
|
|||||||
Reference in New Issue
Block a user