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 | |
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')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 139 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.h | 9 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 20 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioVersionedGenerator.cxx | 9 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 1 | ||||
-rw-r--r-- | Source/cmake.cxx | 3 |
10 files changed, 1 insertions, 194 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 321f377..f1d04e5 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1230,7 +1230,6 @@ const char* cmGlobalVisualStudio10Generator::GetToolsVersion() const { switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS11: return "4.0"; // in Visual Studio 2013 they detached the MSBuild tools version 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( diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index fd25984..ad12c1f 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -13,7 +13,6 @@ #include "cmGlobalVisualStudio10Generator.h" #include "cmTransformDepfile.h" -class cmGlobalGeneratorFactory; class cmMakefile; class cmake; @@ -21,10 +20,6 @@ class cmake; class cmGlobalVisualStudio11Generator : public cmGlobalVisualStudio10Generator { public: - static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory(); - - bool MatchesGeneratorName(const std::string& name) const override; - void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*, bool optional) override; @@ -58,8 +53,4 @@ protected: /** Return true if target system supports debugging deployment. */ bool TargetSystemSupportsDeployment() const override; - -private: - class Factory; - friend class Factory; }; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index b254777..62c0b5b 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -329,26 +329,6 @@ void cmGlobalVisualStudio7Generator::Generate() "Add CMAKE_WARN_VS9=OFF to the cache to disable this warning."); } } - - if (this->Version == VSVersion::VS11 && - !this->CMakeInstance->GetIsInTryCompile()) { - std::string cmakeWarnVS11; - if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue( - "CMAKE_WARN_VS11")) { - this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS11"); - cmakeWarnVS11 = *cached; - } else { - cmSystemTools::GetEnv("CMAKE_WARN_VS11", cmakeWarnVS11); - } - if (cmakeWarnVS11.empty() || !cmIsOff(cmakeWarnVS11)) { - this->CMakeInstance->IssueMessage( - MessageType::WARNING, - "The \"Visual Studio 11 2012\" generator is deprecated " - "and will be removed in a future version of CMake." - "\n" - "Add CMAKE_WARN_VS11=OFF to the cache to disable this warning."); - } - } } void cmGlobalVisualStudio7Generator::OutputSLNFile( diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 702199d..eac0672 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -97,8 +97,6 @@ const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return "9.0"; - case cmGlobalVisualStudioGenerator::VSVersion::VS11: - return "11.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "12.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -124,14 +122,6 @@ void cmGlobalVisualStudioGenerator::WriteSLNHeader(std::ostream& fout) fout << "Microsoft Visual Studio Solution File, Format Version 10.00\n"; fout << "# Visual Studio 2008\n"; break; - case cmGlobalVisualStudioGenerator::VSVersion::VS11: - fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; - if (this->ExpressEdition) { - fout << "# Visual Studio Express 2012 for Windows Desktop\n"; - } else { - fout << "# Visual Studio 2012\n"; - } - break; case cmGlobalVisualStudioGenerator::VSVersion::VS12: fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; if (this->ExpressEdition) { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 3e20ada..3008c18 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -35,7 +35,6 @@ public: enum class VSVersion : uint16_t { VS9 = 90, - VS11 = 110, VS12 = 120, /* VS13 = 130 was skipped */ VS14 = 140, diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index 602b42f..9fe66d3 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -127,8 +127,6 @@ static unsigned int VSVersionToMajor( switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return 9; - case cmGlobalVisualStudioGenerator::VSVersion::VS11: - return 11; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return 12; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -149,8 +147,6 @@ static const char* VSVersionToToolset( switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return "v90"; - case cmGlobalVisualStudioGenerator::VSVersion::VS11: - return "v110"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "v120"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -171,8 +167,6 @@ static std::string VSVersionToMajorString( switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return "9"; - case cmGlobalVisualStudioGenerator::VSVersion::VS11: - return "11"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "12"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -192,7 +186,6 @@ static const char* VSVersionToAndroidToolset( { switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: return ""; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -493,7 +486,6 @@ bool cmGlobalVisualStudioVersionedGenerator::MatchesGeneratorName( std::string genName; switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS14: break; @@ -761,7 +753,6 @@ cmGlobalVisualStudioVersionedGenerator::GetAndroidApplicationTypeRevision() { switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: return ""; case cmGlobalVisualStudioGenerator::VSVersion::VS14: diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index af0e118..24ef5c2 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -198,7 +198,7 @@ void cmLocalVisualStudio7Generator::GenerateTarget(cmGeneratorTarget* target) // Intel Fortran always uses VS9 format ".vfproj" files. cmGlobalVisualStudioGenerator::VSVersion realVersion = gg->GetVersion(); if (this->FortranProject && - gg->GetVersion() >= cmGlobalVisualStudioGenerator::VSVersion::VS11) { + gg->GetVersion() >= cmGlobalVisualStudioGenerator::VSVersion::VS12) { gg->SetVersion(cmGlobalVisualStudioGenerator::VSVersion::VS9); } diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 6e98874..7e4503b 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -75,7 +75,6 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault() // the flag to disable exception handling. When the user does // remove the flag we need to override the IDE default of on. switch (this->Version) { - case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS15: diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 791569c..1fa6ba1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -94,7 +94,6 @@ # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalJOMMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" -# include "cmGlobalVisualStudio11Generator.h" # include "cmGlobalVisualStudio12Generator.h" # include "cmGlobalVisualStudio14Generator.h" # include "cmGlobalVisualStudio9Generator.h" @@ -2605,7 +2604,6 @@ std::unique_ptr<cmGlobalGenerator> cmake::EvaluateDefaultGlobalGenerator() static VSVersionedGenerator const vsGenerators[] = { { "14.0", "Visual Studio 14 2015" }, // { "12.0", "Visual Studio 12 2013" }, // - { "11.0", "Visual Studio 11 2012" }, // { "9.0", "Visual Studio 9 2008" } }; static const char* const vsEntries[] = { @@ -2990,7 +2988,6 @@ void cmake::AddDefaultGenerators() cmGlobalVisualStudioVersionedGenerator::NewFactory15()); this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory()); - this->Generators.push_back(cmGlobalVisualStudio11Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio9Generator::NewFactory()); this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory()); |