diff options
author | Brad King <brad.king@kitware.com> | 2023-06-23 14:52:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-06-23 14:52:48 (GMT) |
commit | f58c7659d8652c1172fc15a0bae9d71ee477c1eb (patch) | |
tree | 5e90da0390eda7b92bb04ed35383b405262eef02 | |
parent | 5061ac9772a3d519641a66072d43fd500ba6cdc7 (diff) | |
parent | a4d532e9987747b08ba46656257863885ee5fd94 (diff) | |
download | CMake-f58c7659d8652c1172fc15a0bae9d71ee477c1eb.zip CMake-f58c7659d8652c1172fc15a0bae9d71ee477c1eb.tar.gz CMake-f58c7659d8652c1172fc15a0bae9d71ee477c1eb.tar.bz2 |
Merge topic 'vs-sdk-selection' into release-3.27
a4d532e998 VS: Restore Windows SDK selection with platform in generator name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8583
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 9 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.h | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.h | 2 |
4 files changed, 10 insertions, 11 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index aefb67a..acb20d1 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -117,10 +117,6 @@ bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p, *targetFrameworkTargetsVersion); } - if (!this->InitializePlatform(mf)) { - return false; - } - // The generator name does not contain the platform name, and so supports // explicit platform specification. We handled that above, so pass an // empty platform name to our base class implementation so it does not error. @@ -206,11 +202,6 @@ bool cmGlobalVisualStudio8Generator::ProcessGeneratorPlatformField( return false; } -bool cmGlobalVisualStudio8Generator::InitializePlatform(cmMakefile*) -{ - return true; -} - cm::optional<std::string> const& cmGlobalVisualStudio8Generator::GetTargetFrameworkVersion() const { diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 5555e9b..cb0ea76 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -60,8 +60,6 @@ protected: cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name, std::string const& platformInGeneratorName); - virtual bool InitializePlatform(cmMakefile* mf); - virtual bool ProcessGeneratorPlatformField(std::string const& key, std::string const& value); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 702199d..6b024db 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -75,6 +75,9 @@ void cmGlobalVisualStudioGenerator::EnableLanguage( bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p, cmMakefile* mf) { + if (!this->InitializePlatform(mf)) { + return false; + } if (this->GetPlatformName() == "x64") { mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); } else if (this->GetPlatformName() == "Itanium") { @@ -84,6 +87,11 @@ bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p, return this->cmGlobalGenerator::SetGeneratorPlatform(p, mf); } +bool cmGlobalVisualStudioGenerator::InitializePlatform(cmMakefile*) +{ + return true; +} + std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const { if (!this->GeneratorPlatform.empty()) { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 3e20ada..52db98d 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -164,6 +164,8 @@ protected: cmGlobalVisualStudioGenerator(cmake* cm, std::string const& platformInGeneratorName); + virtual bool InitializePlatform(cmMakefile* mf); + void AddExtraIDETargets() override; // Does this VS version link targets to each other if there are |