diff options
author | Brad King <brad.king@kitware.com> | 2023-06-13 17:48:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-06-13 18:20:48 (GMT) |
commit | 536c1de1d442c46c23e40ae7b3f60f1a34b11134 (patch) | |
tree | 9251f59c3a6978a05d9ae4e0c0d44f2a770b07fa /Source/cmGlobalVisualStudio11Generator.cxx | |
parent | f444f172c3c00c3aa61395a9eb3a80fef6bd9528 (diff) | |
download | CMake-536c1de1d442c46c23e40ae7b3f60f1a34b11134.zip CMake-536c1de1d442c46c23e40ae7b3f60f1a34b11134.tar.gz CMake-536c1de1d442c46c23e40ae7b3f60f1a34b11134.tar.bz2 |
Drop Visual Studio 11 2012 generator
This generator has been deprecated since CMake 3.25. Remove it.
Diffstat (limited to 'Source/cmGlobalVisualStudio11Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 3ad10eb..c4e1e11 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -8,156 +8,17 @@ #include <vector> #include "cmGlobalGenerator.h" -#include "cmGlobalGeneratorFactory.h" #include "cmGlobalVisualStudioGenerator.h" #include "cmMakefile.h" #include "cmMessageType.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" -static const char vs11generatorName[] = "Visual Studio 11 2012"; - -// Map generator name without year to name with year. -static const char* cmVS11GenName(const std::string& name, std::string& genName) -{ - if (strncmp(name.c_str(), vs11generatorName, - sizeof(vs11generatorName) - 6) != 0) { - return nullptr; - } - const char* p = name.c_str() + sizeof(vs11generatorName) - 6; - if (cmHasLiteralPrefix(p, " 2012")) { - p += 5; - } - genName = std::string(vs11generatorName) + p; - return p; -} - -class cmGlobalVisualStudio11Generator::Factory - : public cmGlobalGeneratorFactory -{ -public: - std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator( - const std::string& name, bool allowArch, cmake* cm) const override - { - std::string genName; - const char* p = cmVS11GenName(name, genName); - if (!p) { - return std::unique_ptr<cmGlobalGenerator>(); - } - if (!*p) { - return std::unique_ptr<cmGlobalGenerator>( - new cmGlobalVisualStudio11Generator(cm, genName, "")); - } - if (!allowArch || *p++ != ' ') { - return std::unique_ptr<cmGlobalGenerator>(); - } - if (strcmp(p, "Win64") == 0) { - return std::unique_ptr<cmGlobalGenerator>( - new cmGlobalVisualStudio11Generator(cm, genName, "x64")); - } - if (strcmp(p, "ARM") == 0) { - return std::unique_ptr<cmGlobalGenerator>( - new cmGlobalVisualStudio11Generator(cm, genName, "ARM")); - } - - std::set<std::string> installedSDKs = - cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs(); - - if (installedSDKs.find(p) == installedSDKs.end()) { - return std::unique_ptr<cmGlobalGenerator>(); - } - - auto ret = std::unique_ptr<cmGlobalVisualStudio11Generator>( - new cmGlobalVisualStudio11Generator(cm, name, p)); - ret->WindowsCEVersion = "8.00"; - return std::unique_ptr<cmGlobalGenerator>(std::move(ret)); - } - - cmDocumentationEntry GetDocumentation() const override - { - return { std::string(vs11generatorName) + " [arch]", - "Deprecated. Generates Visual Studio 2012 project files. " - "Optional [arch] can be \"Win64\" or \"ARM\"." }; - } - - std::vector<std::string> GetGeneratorNames() const override - { - std::vector<std::string> names; - names.push_back(vs11generatorName); - return names; - } - - std::vector<std::string> GetGeneratorNamesWithPlatform() const override - { - std::vector<std::string> names; - names.push_back(vs11generatorName + std::string(" ARM")); - names.push_back(vs11generatorName + std::string(" Win64")); - - std::set<std::string> installedSDKs = - cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs(); - for (std::string const& i : installedSDKs) { - names.push_back(std::string(vs11generatorName) + " " + i); - } - - return names; - } - - bool SupportsToolset() const override { return true; } - bool SupportsPlatform() const override { return true; } - - std::vector<std::string> GetKnownPlatforms() const override - { - std::vector<std::string> platforms; - platforms.emplace_back("x64"); - platforms.emplace_back("Win32"); - platforms.emplace_back("ARM"); - - std::set<std::string> installedSDKs = - cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs(); - for (std::string const& i : installedSDKs) { - platforms.emplace_back(i); - } - - return platforms; - } - - std::string GetDefaultPlatformName() const override { return "Win32"; } -}; - -std::unique_ptr<cmGlobalGeneratorFactory> -cmGlobalVisualStudio11Generator::NewFactory() -{ - return std::unique_ptr<cmGlobalGeneratorFactory>(new Factory); -} - cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( cmake* cm, const std::string& name, std::string const& platformInGeneratorName) : cmGlobalVisualStudio10Generator(cm, name, platformInGeneratorName) { - std::string vc11Express; - this->ExpressEdition = cmSystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0\\Setup\\VC;" - "ProductDir", - vc11Express, cmSystemTools::KeyWOW64_32); - this->DefaultPlatformToolset = "v110"; - this->DefaultCLFlagTableName = "v11"; - this->DefaultCSharpFlagTableName = "v11"; - this->DefaultLibFlagTableName = "v11"; - this->DefaultLinkFlagTableName = "v11"; - this->DefaultMasmFlagTableName = "v11"; - this->DefaultRCFlagTableName = "v11"; - this->Version = VSVersion::VS11; -} - -bool cmGlobalVisualStudio11Generator::MatchesGeneratorName( - const std::string& name) const -{ - std::string genName; - if (cmVS11GenName(name, genName)) { - return genName == this->GetName(); - } - return false; } void cmGlobalVisualStudio11Generator::EnableLanguage( |