diff options
author | Brad King <brad.king@kitware.com> | 2022-09-27 14:32:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-09-27 14:32:11 (GMT) |
commit | 164a156c7c26aaf4f30e73ae0cdb6d2e8a10e0a4 (patch) | |
tree | 80ff163cf9ef18f863398d159996e7050923e06d /Source | |
parent | 2992d4057aea12d88c9cb44b2e001f70ead9eb90 (diff) | |
parent | 8d6f015d59262c53cda4394defaba9b4ae1278dd (diff) | |
download | CMake-164a156c7c26aaf4f30e73ae0cdb6d2e8a10e0a4.zip CMake-164a156c7c26aaf4f30e73ae0cdb6d2e8a10e0a4.tar.gz CMake-164a156c7c26aaf4f30e73ae0cdb6d2e8a10e0a4.tar.bz2 |
Merge topic 'remove-vs10-generator'
8d6f015d59 Drop Visual Studio 10 2010 generator
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7718
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 179 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 14 | ||||
-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/cmLocalVisualStudio10Generator.h | 4 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 4 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 29 | ||||
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 21 | ||||
-rw-r--r-- | Source/cmake.cxx | 3 |
11 files changed, 17 insertions, 277 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 7886fc7..bea2ae7 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -20,7 +20,6 @@ #include "cmDocumentationEntry.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" -#include "cmGlobalGeneratorFactory.h" #include "cmGlobalVisualStudio71Generator.h" #include "cmGlobalVisualStudio7Generator.h" #include "cmGlobalVisualStudioGenerator.h" @@ -38,7 +37,6 @@ #include "cmXMLWriter.h" #include "cmake.h" -static const char vs10generatorName[] = "Visual Studio 10 2010"; static std::map<std::string, std::vector<cmIDEFlagTable>> loadedFlagJsonFiles; static void ConvertToWindowsSlashes(std::string& s) @@ -51,137 +49,14 @@ static void ConvertToWindowsSlashes(std::string& s) } } -// Map generator name without year to name with year. -static const char* cmVS10GenName(const std::string& name, std::string& genName) -{ - if (strncmp(name.c_str(), vs10generatorName, - sizeof(vs10generatorName) - 6) != 0) { - return 0; - } - const char* p = name.c_str() + sizeof(vs10generatorName) - 6; - if (cmHasLiteralPrefix(p, " 2010")) { - p += 5; - } - genName = std::string(vs10generatorName) + p; - return p; -} - -class cmGlobalVisualStudio10Generator::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 = cmVS10GenName(name, genName); - if (!p) { - return std::unique_ptr<cmGlobalGenerator>(); - } - if (!*p) { - return std::unique_ptr<cmGlobalGenerator>( - new cmGlobalVisualStudio10Generator(cm, genName, "")); - } - if (!allowArch || *p++ != ' ') { - return std::unique_ptr<cmGlobalGenerator>(); - } - if (strcmp(p, "Win64") == 0) { - return std::unique_ptr<cmGlobalGenerator>( - new cmGlobalVisualStudio10Generator(cm, genName, "x64")); - } - if (strcmp(p, "IA64") == 0) { - return std::unique_ptr<cmGlobalGenerator>( - new cmGlobalVisualStudio10Generator(cm, genName, "Itanium")); - } - return std::unique_ptr<cmGlobalGenerator>(); - } - - void GetDocumentation(cmDocumentationEntry& entry) const override - { - entry.Name = std::string(vs10generatorName) + " [arch]"; - entry.Brief = "Deprecated. Generates Visual Studio 2010 project files. " - "Optional [arch] can be \"Win64\" or \"IA64\"."; - } - - std::vector<std::string> GetGeneratorNames() const override - { - std::vector<std::string> names; - names.push_back(vs10generatorName); - return names; - } - - std::vector<std::string> GetGeneratorNamesWithPlatform() const override - { - std::vector<std::string> names; - names.push_back(vs10generatorName + std::string(" IA64")); - names.push_back(vs10generatorName + std::string(" Win64")); - 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("Itanium"); - return platforms; - } - - std::string GetDefaultPlatformName() const override { return "Win32"; } -}; - -std::unique_ptr<cmGlobalGeneratorFactory> -cmGlobalVisualStudio10Generator::NewFactory() -{ - return std::unique_ptr<cmGlobalGeneratorFactory>(new Factory); -} - cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( cmake* cm, const std::string& name, std::string const& platformInGeneratorName) : cmGlobalVisualStudio8Generator(cm, name, platformInGeneratorName) { - std::string vc10Express; - this->ExpressEdition = cmSystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0\\Setup\\VC;" - "ProductDir", - vc10Express, cmSystemTools::KeyWOW64_32); - this->CudaEnabled = false; - { - std::string envPlatformToolset; - if (cmSystemTools::GetEnv("PlatformToolset", envPlatformToolset) && - envPlatformToolset == "Windows7.1SDK") { - // We are running from a Windows7.1SDK command prompt. - this->DefaultPlatformToolset = "Windows7.1SDK"; - } else { - this->DefaultPlatformToolset = "v100"; - } - } - this->DefaultCLFlagTableName = "v10"; - this->DefaultCSharpFlagTableName = "v10"; - this->DefaultLibFlagTableName = "v10"; - this->DefaultLinkFlagTableName = "v10"; this->DefaultCudaFlagTableName = "v10"; this->DefaultCudaHostFlagTableName = "v10"; - this->DefaultMasmFlagTableName = "v10"; this->DefaultNasmFlagTableName = "v10"; - this->DefaultRCFlagTableName = "v10"; - - this->Version = VSVersion::VS10; - this->PlatformToolsetNeedsDebugEnum = false; -} - -bool cmGlobalVisualStudio10Generator::MatchesGeneratorName( - const std::string& name) const -{ - std::string genName; - if (cmVS10GenName(name, genName)) { - return genName == this->GetName(); - } - return false; } bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, @@ -195,21 +70,6 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf); } -bool cmGlobalVisualStudio10Generator::SetGeneratorPlatform( - std::string const& p, cmMakefile* mf) -{ - if (!this->cmGlobalVisualStudio8Generator::SetGeneratorPlatform(p, mf)) { - return false; - } - if (this->GetPlatformName() == "Itanium" || - this->GetPlatformName() == "x64") { - if (this->IsExpressEdition() && !this->Find64BitTools(mf)) { - return false; - } - } - return true; -} - static void cmCudaToolVersion(std::string& s) { // "CUDA x.y.props" => "x.y" @@ -1307,44 +1167,6 @@ cmGlobalVisualStudio10Generator::GenerateBuildCommand( return makeCommands; } -bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf) -{ - if (this->DefaultPlatformToolset == "v100") { - // The v100 64-bit toolset does not exist in the express edition. - this->DefaultPlatformToolset.clear(); - } - if (this->GetPlatformToolset()) { - return true; - } - // This edition does not come with 64-bit tools. Look for them. - // - // TODO: Detect available tools? x64\v100 exists but does not work? - // HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0;VCTargetsPath - // c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/Platforms/ - // {Itanium,Win32,x64}/PlatformToolsets/{v100,v90,Windows7.1SDK} - std::string winSDK_7_1; - if (cmSystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\" - "Windows\\v7.1;InstallationFolder", - winSDK_7_1)) { - std::ostringstream m; - m << "Found Windows SDK v7.1: " << winSDK_7_1; - mf->DisplayStatus(m.str(), -1); - this->DefaultPlatformToolset = "Windows7.1SDK"; - return true; - } else { - std::ostringstream e; - /* clang-format off */ - e << "Cannot enable 64-bit tools with Visual Studio 2010 Express.\n" - << "Install the Microsoft Windows SDK v7.1 to get 64-bit tools:\n" - << " http://msdn.microsoft.com/en-us/windows/bb980924.aspx"; - /* clang-format on */ - mf->IssueMessage(MessageType::FATAL_ERROR, e.str().c_str()); - cmSystemTools::SetFatalErrorOccurred(); - return false; - } -} - std::string cmGlobalVisualStudio10Generator::GenerateRuleFile( std::string const& output) const { @@ -1382,7 +1204,6 @@ const char* cmGlobalVisualStudio10Generator::GetToolsVersion() const { switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS10: case cmGlobalVisualStudioGenerator::VSVersion::VS11: return "4.0"; diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index a33c94e..b32c0a7 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -14,7 +14,6 @@ #include "cmGlobalVisualStudio8Generator.h" class cmGeneratorTarget; -class cmGlobalGeneratorFactory; class cmLocalGenerator; class cmMakefile; class cmSourceFile; @@ -29,14 +28,9 @@ struct cmIDEFlagTable; class cmGlobalVisualStudio10Generator : public cmGlobalVisualStudio8Generator { public: - static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory(); - bool IsVisualStudioAtLeast10() const override { return true; } - bool MatchesGeneratorName(const std::string& name) const override; - bool SetSystemName(std::string const& s, cmMakefile* mf) override; - bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; bool SetGeneratorToolset(std::string const& ts, bool build, cmMakefile* mf) override; @@ -131,7 +125,6 @@ public: bool TargetsAndroid() const { return this->SystemIsAndroid; } const char* GetCMakeCFGIntDir() const override { return "$(Configuration)"; } - bool Find64BitTools(cmMakefile* mf); /** Generate an <output>.rule file path for a given command output. */ std::string GenerateRuleFile(std::string const& output) const override; @@ -244,9 +237,6 @@ protected: bool MSBuildCommandInitialized = false; private: - class Factory; - friend class Factory; - struct LongestSourcePath { LongestSourcePath() @@ -270,7 +260,7 @@ private: std::string GeneratorToolsetVersion; - bool PlatformToolsetNeedsDebugEnum; + bool PlatformToolsetNeedsDebugEnum = false; bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); @@ -291,7 +281,7 @@ private: std::string VCTargetsPath; bool FindVCTargetsPath(cmMakefile* mf); - bool CudaEnabled; + bool CudaEnabled = false; // We do not use the reload macros for VS >= 10. std::string GetUserMacrosDirectory() override { return ""; } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index e53ae8e..7bf3c3a 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -303,26 +303,6 @@ void cmGlobalVisualStudio7Generator::Generate() this->CallVisualStudioMacro(MacroReload, GetSLNFile(this->LocalGenerators[0].get())); } - - if (this->Version == VSVersion::VS10 && - !this->CMakeInstance->GetIsInTryCompile()) { - std::string cmakeWarnVS10; - if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue( - "CMAKE_WARN_VS10")) { - this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS10"); - cmakeWarnVS10 = *cached; - } else { - cmSystemTools::GetEnv("CMAKE_WARN_VS10", cmakeWarnVS10); - } - if (cmakeWarnVS10.empty() || !cmIsOff(cmakeWarnVS10)) { - this->CMakeInstance->IssueMessage( - MessageType::WARNING, - "The \"Visual Studio 10 2010\" generator is deprecated " - "and will be removed in a future version of CMake." - "\n" - "Add CMAKE_WARN_VS10=OFF to the cache to disable this warning."); - } - } } void cmGlobalVisualStudio7Generator::OutputSLNFile( diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index c6af20a..deed3f8 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -99,8 +99,6 @@ const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return "9.0"; - case cmGlobalVisualStudioGenerator::VSVersion::VS10: - return "10.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS11: return "11.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: @@ -128,14 +126,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::VS10: - fout << "Microsoft Visual Studio Solution File, Format Version 11.00\n"; - if (this->ExpressEdition) { - fout << "# Visual C++ Express 2010\n"; - } else { - fout << "# Visual Studio 2010\n"; - } - break; case cmGlobalVisualStudioGenerator::VSVersion::VS11: 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 f45b4d4..576e4f2 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -35,7 +35,6 @@ public: enum class VSVersion : uint16_t { VS9 = 90, - VS10 = 100, VS11 = 110, VS12 = 120, /* VS13 = 130 was skipped */ diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index c3ba2c2..e9c8254 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::VS10: - return 10; case cmGlobalVisualStudioGenerator::VSVersion::VS11: return 11; case cmGlobalVisualStudioGenerator::VSVersion::VS12: @@ -151,8 +149,6 @@ static const char* VSVersionToToolset( switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return "v90"; - case cmGlobalVisualStudioGenerator::VSVersion::VS10: - return "v100"; case cmGlobalVisualStudioGenerator::VSVersion::VS11: return "v110"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: @@ -175,8 +171,6 @@ static std::string VSVersionToMajorString( switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: return "9"; - case cmGlobalVisualStudioGenerator::VSVersion::VS10: - return "10"; case cmGlobalVisualStudioGenerator::VSVersion::VS11: return "11"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: @@ -198,7 +192,6 @@ static const char* VSVersionToAndroidToolset( { switch (v) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS10: case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: return ""; @@ -500,7 +493,6 @@ bool cmGlobalVisualStudioVersionedGenerator::MatchesGeneratorName( std::string genName; switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS10: case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -743,7 +735,6 @@ cmGlobalVisualStudioVersionedGenerator::GetAndroidApplicationTypeRevision() { switch (this->Version) { case cmGlobalVisualStudioGenerator::VSVersion::VS9: - case cmGlobalVisualStudioGenerator::VSVersion::VS10: case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: return ""; diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h index 75fe262..7bfe3b7 100644 --- a/Source/cmLocalVisualStudio10Generator.h +++ b/Source/cmLocalVisualStudio10Generator.h @@ -15,8 +15,8 @@ class cmMakefile; /** \class cmLocalVisualStudio10Generator * \brief Write Visual Studio 10 project files. * - * cmLocalVisualStudio10Generator produces a Visual Studio 10 project - * file for each target in its directory. + * cmLocalVisualStudio10Generator produces a MSBuild project file for each + * target in its directory. */ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator { diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 0451d96..af2d31d 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -195,10 +195,10 @@ void cmLocalVisualStudio7Generator::GenerateTarget(cmGeneratorTarget* target) this->FortranProject = gg->TargetIsFortranOnly(target); this->WindowsCEProject = gg->TargetsWindowsCE(); - // Intel Fortran for VS10 uses VS9 format ".vfproj" files. + // Intel Fortran always uses VS9 format ".vfproj" files. cmGlobalVisualStudioGenerator::VSVersion realVersion = gg->GetVersion(); if (this->FortranProject && - gg->GetVersion() >= cmGlobalVisualStudioGenerator::VSVersion::VS10) { + gg->GetVersion() >= cmGlobalVisualStudioGenerator::VSVersion::VS11) { gg->SetVersion(cmGlobalVisualStudioGenerator::VSVersion::VS9); } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 44c089e..c09eefa 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1809,11 +1809,8 @@ void cmVisualStudio10TargetGenerator::WriteCustomRuleCpp( e2.WritePlatformConfigTag("Command", cond, script); e2.WritePlatformConfigTag("AdditionalInputs", cond, additional_inputs); e2.WritePlatformConfigTag("Outputs", cond, outputs); - if (this->LocalGenerator->GetVersion() > - cmGlobalVisualStudioGenerator::VSVersion::VS10) { - // VS >= 11 let us turn off linking of custom command outputs. - e2.WritePlatformConfigTag("LinkObjects", cond, "false"); - } + // Turn off linking of custom command outputs. + e2.WritePlatformConfigTag("LinkObjects", cond, "false"); if (symbolic && this->LocalGenerator->GetVersion() >= cmGlobalVisualStudioGenerator::VSVersion::VS16) { @@ -2378,28 +2375,6 @@ void cmVisualStudio10TargetGenerator::WriteSource(Elem& e2, // we must use relative paths. bool forceRelative = sf->GetLanguage() == "CUDA"; std::string sourceFile = this->ConvertPath(sf->GetFullPath(), forceRelative); - if (this->LocalGenerator->GetVersion() == - cmGlobalVisualStudioGenerator::VSVersion::VS10 && - cmSystemTools::FileIsFullPath(sourceFile)) { - // Normal path conversion resulted in a full path. VS 10 (but not 11) - // refuses to show the property page in the IDE for a source file with a - // full path (not starting in a '.' or '/' AFAICT). CMake <= 2.8.4 used a - // relative path but to allow deeper build trees CMake 2.8.[5678] used a - // full path except for custom commands. Custom commands do not work - // without a relative path, but they do not seem to be involved in tools - // with the above behavior. For other sources we now use a relative path - // when the combined path will not be too long so property pages appear. - std::string sourceRel = this->ConvertPath(sf->GetFullPath(), true); - size_t const maxLen = 250; - if (sf->GetCustomCommand() || - ((this->LocalGenerator->GetCurrentBinaryDirectory().length() + 1 + - sourceRel.length()) <= maxLen)) { - forceRelative = true; - sourceFile = sourceRel; - } else { - this->GlobalGenerator->PathTooLong(this->GeneratorTarget, sf, sourceRel); - } - } ConvertToWindowsSlash(sourceFile); e2.Attribute("Include", sourceFile); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 16584f5..e6f5ece 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::VS10: case cmGlobalVisualStudioGenerator::VSVersion::VS11: case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -101,14 +100,12 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose) // to the generated project to disable logo suppression. Otherwise // the GUI default is to enable suppression. // - // On Visual Studio 10 (and later!), the value of this attribute should be - // an empty string, instead of "FALSE", in order to avoid a warning: - // "cl ... warning D9035: option 'nologo-' has been deprecated" - // + // On Visual Studio 9, the value of this attribute should be + // "FALSE", instead of an empty string. if (verbose && this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) { this->FlagMap["SuppressStartupBanner"] = - this->Version < cmGlobalVisualStudioGenerator::VSVersion::VS10 ? "FALSE" + this->Version == cmGlobalVisualStudioGenerator::VSVersion::VS9 ? "FALSE" : ""; } } @@ -373,7 +370,7 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( } std::ostringstream oss; - if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS10) { + if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9) { oss << "%(" << tag << ")"; } std::vector<std::string>::const_iterator de = @@ -381,13 +378,13 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( for (std::string const& di : cmMakeRange(this->Defines.cbegin(), de)) { // Escape the definition for the compiler. std::string define; - if (this->Version < cmGlobalVisualStudioGenerator::VSVersion::VS10) { + if (this->Version == cmGlobalVisualStudioGenerator::VSVersion::VS9) { define = this->LocalGenerator->EscapeForShell(di, true); } else { define = di; } // Escape this flag for the MSBuild. - if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS10) { + if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9) { cmVS10EscapeForMSBuild(define); if (lang == "RC") { cmSystemTools::ReplaceString(define, "\"", "\\\""); @@ -429,7 +426,7 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories( } // Escape this include for the MSBuild. - if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS10) { + if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9) { cmVS10EscapeForMSBuild(include); } oss << sep << include; @@ -441,7 +438,7 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories( } } - if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS10) { + if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9) { oss << sep << "%(" << tag << ")"; } @@ -455,7 +452,7 @@ void cmVisualStudioGeneratorOptions::OutputFlagMap(std::ostream& fout, std::ostringstream oss; const char* sep = ""; for (std::string i : m.second) { - if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS10) { + if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9) { cmVS10EscapeForMSBuild(i); } oss << sep << i; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3b105e3..28b25c1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -83,7 +83,6 @@ # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalJOMMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" -# include "cmGlobalVisualStudio10Generator.h" # include "cmGlobalVisualStudio11Generator.h" # include "cmGlobalVisualStudio12Generator.h" # include "cmGlobalVisualStudio14Generator.h" @@ -2365,7 +2364,6 @@ std::unique_ptr<cmGlobalGenerator> cmake::EvaluateDefaultGlobalGenerator() { "14.0", "Visual Studio 14 2015" }, // { "12.0", "Visual Studio 12 2013" }, // { "11.0", "Visual Studio 11 2012" }, // - { "10.0", "Visual Studio 10 2010" }, // { "9.0", "Visual Studio 9 2008" } }; static const char* const vsEntries[] = { @@ -2694,7 +2692,6 @@ void cmake::AddDefaultGenerators() this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio11Generator::NewFactory()); - this->Generators.push_back(cmGlobalVisualStudio10Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio9Generator::NewFactory()); this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory()); |