diff options
28 files changed, 38 insertions, 361 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 523e1b3..99adc85 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -436,7 +436,7 @@ one of the keywords to make clear the behavior they expect. Because generator expressions can be used in custom commands, it is possible to define ``COMMAND`` lines or whole custom commands which evaluate to empty strings for certain configurations. - For **Visual Studio 2010 (and newer)** generators these command + For **Visual Studio 11 2012 (and newer)** generators these command lines or custom commands will be omitted for the specific configuration and no "empty-string-command" will be added. diff --git a/Help/generator/Visual Studio 10 2010.rst b/Help/generator/Visual Studio 10 2010.rst index 66cd25f..ee44514 100644 --- a/Help/generator/Visual Studio 10 2010.rst +++ b/Help/generator/Visual Studio 10 2010.rst @@ -1,52 +1,8 @@ Visual Studio 10 2010 --------------------- -Deprecated. Generates Visual Studio 10 (VS 2010) project files. - -.. note:: - This generator is deprecated and will be removed in a future version - of CMake. It will still be possible to build with VS 10 2010 tools - using the :generator:`Visual Studio 11 2012` (or above) generator - with :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v100``, or by - using the :generator:`NMake Makefiles` generator. - -For compatibility with CMake versions prior to 3.0, one may specify this -generator using the name ``Visual Studio 10`` without the year component. - -Project Types -^^^^^^^^^^^^^ - -Only Visual C++ and C# projects may be generated (and Fortran with -Intel compiler integration). Other types of projects (Database, -Website, etc.) are not supported. - -Platform Selection -^^^^^^^^^^^^^^^^^^ - -The default target platform name (architecture) is ``Win32``. - -.. versionadded:: 3.1 - The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps - via the :option:`cmake -A` option, to specify a target platform - name (architecture). For example: - - * ``cmake -G "Visual Studio 10 2010" -A Win32`` - * ``cmake -G "Visual Studio 10 2010" -A x64`` - * ``cmake -G "Visual Studio 10 2010" -A Itanium`` - -For compatibility with CMake versions prior to 3.1, one may specify -a target platform name optionally at the end of the generator name. -This is supported only for: - -``Visual Studio 10 2010 Win64`` - Specify target platform ``x64``. - -``Visual Studio 10 2010 IA64`` - Specify target platform ``Itanium``. - -Toolset Selection -^^^^^^^^^^^^^^^^^ - -The ``v100`` toolset that comes with Visual Studio 10 2010 is selected by -default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps -via the :option:`cmake -T` option, to specify another toolset. +Removed. This once generated Visual Studio 10 2010 project files, but +the generator has been removed since CMake 3.25. It is still possible +to build with VS 10 2010 tools using the :generator:`Visual Studio 11 2012` +(or above) generator with :variable:`CMAKE_GENERATOR_TOOLSET` set to +``v100``, or by using the :generator:`NMake Makefiles` generator. diff --git a/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst b/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst index 58476d6..1e84c00 100644 --- a/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst +++ b/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst @@ -9,5 +9,5 @@ The property value may use This is defined in ``<LocalDebuggerCommand>`` in the Visual Studio project file. -This property only works for Visual Studio 2010 and above; +This property only works for Visual Studio 11 2012 and above; it is ignored on other generators. diff --git a/Help/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.rst b/Help/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.rst index 6c26601..e54e140 100644 --- a/Help/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.rst +++ b/Help/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.rst @@ -9,5 +9,5 @@ The property value may use This is defined in ``<LocalDebuggerCommandArguments>`` in the Visual Studio project file. -This property only works for Visual Studio 2010 and above; +This property only works for Visual Studio 11 2012 and above; it is ignored on other generators. diff --git a/Help/prop_tgt/VS_DEBUGGER_ENVIRONMENT.rst b/Help/prop_tgt/VS_DEBUGGER_ENVIRONMENT.rst index 2f59a82..60bc2f0 100644 --- a/Help/prop_tgt/VS_DEBUGGER_ENVIRONMENT.rst +++ b/Help/prop_tgt/VS_DEBUGGER_ENVIRONMENT.rst @@ -9,5 +9,5 @@ The property value may use This is defined in ``<LocalDebuggerEnvironment>`` in the Visual Studio project file. -This property only works for Visual Studio 2010 and above; +This property only works for Visual Studio 11 2012 and above; it is ignored on other generators. diff --git a/Help/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.rst b/Help/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.rst index c163abf..f9ce7aa 100644 --- a/Help/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.rst +++ b/Help/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.rst @@ -9,5 +9,5 @@ The property value may use This is defined in ``<LocalDebuggerWorkingDirectory>`` in the Visual Studio project file. -This property only works for Visual Studio 2010 and above; +This property only works for Visual Studio 11 2012 and above; it is ignored on other generators. diff --git a/Help/prop_tgt/VS_DOTNET_STARTUP_OBJECT.rst b/Help/prop_tgt/VS_DOTNET_STARTUP_OBJECT.rst index 5212293..8a85ba4 100644 --- a/Help/prop_tgt/VS_DOTNET_STARTUP_OBJECT.rst +++ b/Help/prop_tgt/VS_DOTNET_STARTUP_OBJECT.rst @@ -12,7 +12,7 @@ If the property is unset, Visual Studio uses the first matching than one ``Main()`` method is available in the current project, the property becomes mandatory for building the project. -This property only works for Visual Studio 2010 and above; +This property only works for Visual Studio 11 2012 and above; it is ignored on other generators. .. code-block:: cmake diff --git a/Help/prop_tgt/VS_KEYWORD.rst b/Help/prop_tgt/VS_KEYWORD.rst index 6c2e042..221b986 100644 --- a/Help/prop_tgt/VS_KEYWORD.rst +++ b/Help/prop_tgt/VS_KEYWORD.rst @@ -7,4 +7,4 @@ Can be set to change the visual studio keyword, for example Qt integration works better if this is set to Qt4VSv1.0. Use the :prop_tgt:`VS_GLOBAL_KEYWORD` target property to set the -keyword for Visual Studio 10 (2010) and newer. +keyword for Visual Studio 11 (2012) and newer. diff --git a/Help/release/dev/remove-vs10-generator.rst b/Help/release/dev/remove-vs10-generator.rst new file mode 100644 index 0000000..32e1da6 --- /dev/null +++ b/Help/release/dev/remove-vs10-generator.rst @@ -0,0 +1,4 @@ +remove-vs10-generator +--------------------- + +* The :generator:`Visual Studio 10 2010` generator has been removed. diff --git a/Help/variable/CMAKE_CFG_INTDIR.rst b/Help/variable/CMAKE_CFG_INTDIR.rst index 43668ea..3a57659 100644 --- a/Help/variable/CMAKE_CFG_INTDIR.rst +++ b/Help/variable/CMAKE_CFG_INTDIR.rst @@ -19,7 +19,7 @@ Example values: :: $(ConfigurationName) = Visual Studio 9 - $(Configuration) = Visual Studio 10 + $(Configuration) = Visual Studio 11 and above $(CONFIGURATION) = Xcode . = Make-based tools . = Ninja diff --git a/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst b/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst index f109a9e..2bb97c4 100644 --- a/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst +++ b/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst @@ -10,5 +10,5 @@ This variable is not defined by other generators even if ``devenv.com`` is installed on the computer. The :variable:`CMAKE_VS_MSBUILD_COMMAND` is also provided for -:generator:`Visual Studio 10 2010` and above. +:generator:`Visual Studio 11 2012` and above. See also the :variable:`CMAKE_MAKE_PROGRAM` variable. diff --git a/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst b/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst index 58f2bef..8a521a3 100644 --- a/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst +++ b/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst @@ -1,7 +1,7 @@ CMAKE_VS_MSBUILD_COMMAND ------------------------ -The generators for :generator:`Visual Studio 10 2010` and above set this +The generators for :generator:`Visual Studio 11 2012` and above set this variable to the ``MSBuild.exe`` command installed with the corresponding Visual Studio version. diff --git a/Modules/CMakeDetermineCSharpCompiler.cmake b/Modules/CMakeDetermineCSharpCompiler.cmake index da860a8..fe98469 100644 --- a/Modules/CMakeDetermineCSharpCompiler.cmake +++ b/Modules/CMakeDetermineCSharpCompiler.cmake @@ -3,7 +3,7 @@ if(NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") message(FATAL_ERROR - "C# is currently only supported for Microsoft Visual Studio 2010 and later.") + "C# is currently only supported for Microsoft Visual Studio 11 2012 and later.") endif() include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) 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 9b40542..25ba68a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1808,11 +1808,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) { @@ -2377,28 +2374,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()); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a58c7e9..934f054 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -39,13 +39,6 @@ set(ENV{HOME} \"${TEST_HOME}\") ") endif() -# Suppress generator deprecation warnings in test suite. -if(CMAKE_GENERATOR MATCHES "^Visual Studio 10 2010") - set(TEST_WARN_VS10_CODE "set(ENV{CMAKE_WARN_VS10} OFF)") -else() - set(TEST_WARN_VS10_CODE "") -endif() - # 3.9 or later provides a definitive answer to whether we are multi-config # through a global property. Prior to 3.9, CMAKE_CONFIGURATION_TYPES being set # is assumed to mean multi-config, but developers might modify it so it is @@ -2442,9 +2435,6 @@ if(BUILD_TESTING) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSAndroid/${name}") endmacro() if(tegra AND NOT "${CMake_SOURCE_DIR};${CMake_BINARY_DIR}" MATCHES " ") - if(vs10) - add_test_VSAndroid(vs10 "Visual Studio 10 2010" "Tegra-Android") - endif() if(vs11) add_test_VSAndroid(vs11 "Visual Studio 11 2012" "Tegra-Android") endif() diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index 06f416b..8099079 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -60,8 +60,7 @@ set(run_BuildDepends_skip_step_3 1) run_BuildDepends(C-Exe) if(NOT RunCMake_GENERATOR STREQUAL "Xcode") - if(RunCMake_GENERATOR MATCHES "Visual Studio 10" OR - RunCMake_GENERATOR_TOOLSET MATCHES "^(v80|v90|v100)$") + if(RunCMake_GENERATOR_TOOLSET MATCHES "^(v80|v90|v100)$") # VS 10 forgets to re-link when a manifest changes set(run_BuildDepends_skip_step_2 1) endif() diff --git a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt deleted file mode 100644 index 202ef80..0000000 --- a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Warning: - The "Visual Studio 10 2010" generator is deprecated and will be removed in - a future version of CMake. - - Add CMAKE_WARN_VS10=OFF to the cache to disable this warning.$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 1b5a1d6..dc61759 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -1071,10 +1071,3 @@ set(ProfilingTestOutput ${RunCMake_TEST_BINARY_DIR}/output.json) set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${ProfilingTestOutput}) run_cmake(ProfilingTest) unset(RunCMake_TEST_OPTIONS) - -if(RunCMake_GENERATOR MATCHES "^Visual Studio 10 2010") - run_cmake_with_options(DeprecateVS10-WARN-ON -DCMAKE_WARN_VS10=ON) - unset(ENV{CMAKE_WARN_VS10}) - run_cmake(DeprecateVS10-WARN-ON) - run_cmake_with_options(DeprecateVS10-WARN-OFF -DCMAKE_WARN_VS10=OFF) -endif() |