From 03c31b0395eaabbfd76d255f85d50b1df1437aef Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 6 May 2024 12:40:04 -0400 Subject: [PATCH] Drop Visual Studio 9 2008 generator This generator has been deprecated since CMake 3.27. Remove it. --- Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst | 2 +- Help/generator/Visual Studio 9 2008.rst | 44 +---- .../VS_GLOBAL_SECTION_POST_section.rst | 2 +- .../VS_GLOBAL_SECTION_PRE_section.rst | 2 +- Help/prop_sf/COMPILE_FLAGS.rst | 3 +- Help/prop_sf/COMPILE_OPTIONS.rst | 3 +- Help/prop_tgt/DEPLOYMENT_ADDITIONAL_FILES.rst | 2 +- Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst | 2 +- Help/prop_tgt/LINKER_TYPE.rst | 3 +- Help/prop_tgt/VS_GLOBAL_KEYWORD.rst | 5 +- Help/prop_tgt/VS_KEYWORD.rst | 7 +- Help/release/dev/remove-vs9-generator.rst | 4 + Help/variable/CMAKE_CFG_INTDIR.rst | 1 - Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst | 2 +- Help/variable/CMAKE_VS_DEVENV_COMMAND.rst | 2 +- ...CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst | 2 +- Modules/CheckIPOSupported.cmake | 5 - Source/CMakeLists.txt | 2 - Source/cmGlobalVisualStudio10Generator.cxx | 6 - Source/cmGlobalVisualStudio7Generator.cxx | 20 --- Source/cmGlobalVisualStudio9Generator.cxx | 163 ------------------ Source/cmGlobalVisualStudio9Generator.h | 43 ----- Source/cmGlobalVisualStudioGenerator.cxx | 6 - Source/cmGlobalVisualStudioGenerator.h | 1 - ...cmGlobalVisualStudioVersionedGenerator.cxx | 9 - Source/cmLocalVisualStudio7Generator.cxx | 14 +- Source/cmVisualStudioGeneratorOptions.cxx | 26 +-- Source/cmVisualStudioGeneratorOptions.h | 1 - Source/cmake.cxx | 15 +- Tests/BuildDepends/CMakeLists.txt | 2 +- Tests/CMakeLists.txt | 16 +- Tests/CMakeOnly/CMakeLists.txt | 2 +- Tests/CompileOptions/CMakeLists.txt | 6 +- Tests/IncludeDirectories/CMakeLists.txt | 4 +- .../RunCMake/BuildDepends/RunCMakeTest.cmake | 6 +- .../CMP0069/CMP0069-NEW-generator-result.txt | 1 - .../CMP0069/CMP0069-NEW-generator-stderr.txt | 6 - .../CMP0069/CMP0069-NEW-generator.cmake | 7 - Tests/RunCMake/CMP0069/RunCMakeTest.cmake | 4 - Tests/RunCMake/CMakeLists.txt | 10 +- .../RunCMake/CMakePresets/RunCMakeTest.cmake | 16 +- .../CheckIPOSupported/RunCMakeTest.cmake | 7 +- .../not-supported-by-generator-result.txt | 1 - .../not-supported-by-generator-stderr.txt | 6 - .../not-supported-by-generator.cmake | 6 - .../CommandLine/DeprecateVS9-WARN-OFF.cmake | 0 .../DeprecateVS9-WARN-ON-stderr.txt | 5 - .../CommandLine/DeprecateVS9-WARN-ON.cmake | 0 .../Envgen-A-platform-stderr-vs9.txt | 2 - .../Envgen-platform-invalid-stderr-vs9.txt | 2 - Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 13 -- .../ExternalProject/RunCMakeTest.cmake | 6 +- .../GeneratorPlatform/RunCMakeTest.cmake | 4 +- Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | 5 +- .../LinkerSelection/RunCMakeTest.cmake | 5 - .../UnsupportedLinkerType-result.txt | 1 - .../UnsupportedLinkerType-stderr.txt | 3 - .../UnsupportedLinkerType.cmake | 5 - .../ParseImplicitLinkInfo/RunCMakeTest.cmake | 3 +- Tests/RunCMake/VSSolution/RunCMakeTest.cmake | 10 +- .../add_custom_command/RunCMakeTest.cmake | 2 +- .../RunCMakeTest.cmake | 2 +- .../RunCMakeTest.cmake | 2 +- 63 files changed, 71 insertions(+), 496 deletions(-) create mode 100644 Help/release/dev/remove-vs9-generator.rst delete mode 100644 Source/cmGlobalVisualStudio9Generator.cxx delete mode 100644 Source/cmGlobalVisualStudio9Generator.h delete mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-generator-result.txt delete mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt delete mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake delete mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt delete mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt delete mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake delete mode 100644 Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake delete mode 100644 Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake delete mode 100644 Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt delete mode 100644 Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt delete mode 100644 Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-result.txt delete mode 100644 Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt delete mode 100644 Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake diff --git a/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst b/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst index 77ead4d55c..82bd007e3f 100644 --- a/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst +++ b/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst @@ -4,7 +4,7 @@ CMAKE_MSVCIDE_RUN_PATH .. include:: ENV_VAR.txt Extra PATH locations for custom commands when using -:generator:`Visual Studio 9 2008` (or above) generators. +:generator:`Visual Studio 12 2013` (or above) generators. The ``CMAKE_MSVCIDE_RUN_PATH`` environment variable sets the default value for the :variable:`CMAKE_MSVCIDE_RUN_PATH` variable if not already explicitly set. diff --git a/Help/generator/Visual Studio 9 2008.rst b/Help/generator/Visual Studio 9 2008.rst index 143927046b..01d5af2b2c 100644 --- a/Help/generator/Visual Studio 9 2008.rst +++ b/Help/generator/Visual Studio 9 2008.rst @@ -1,41 +1,9 @@ Visual Studio 9 2008 -------------------- -Deprecated. Generates Visual Studio 9 2008 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 9 2008 tools - using the :generator:`Visual Studio 14 2015` generator (or above, - and with VS 10 2010 also installed) with - :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v90``, - or by using the :generator:`NMake Makefiles` generator. - -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 9 2008" -A Win32`` - * ``cmake -G "Visual Studio 9 2008" -A x64`` - * ``cmake -G "Visual Studio 9 2008" -A Itanium`` - * ``cmake -G "Visual Studio 9 2008" -A `` - (Specify a target platform matching a Windows CE SDK name.) - -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 9 2008 Win64`` - Specify target platform ``x64``. - -``Visual Studio 9 2008 IA64`` - Specify target platform ``Itanium``. - -``Visual Studio 9 2008 `` - Specify target platform matching a Windows CE SDK name. +Removed. This once generated Visual Studio 9 2008 project files, but +the generator has been removed since CMake 3.30. It is still possible +to build with VS 9 2008 tools using the :generator:`Visual Studio 14 2015` +generator (or above, and with VS 10 2010 also installed) with +:variable:`CMAKE_GENERATOR_TOOLSET` set to ``v90``, or by using +the :generator:`NMake Makefiles` generator. diff --git a/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst b/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst index b65db99f35..c36306df5d 100644 --- a/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst +++ b/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst @@ -17,7 +17,7 @@ pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped. -This property only works for Visual Studio 9 and above; it is ignored +This property only works for Visual Studio 12 and above; it is ignored on other generators. The property only applies when set on a directory whose ``CMakeLists.txt`` contains a :command:`project` command. diff --git a/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst b/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst index 7f8bf61612..c775ad5262 100644 --- a/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst +++ b/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst @@ -17,6 +17,6 @@ pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped. -This property only works for Visual Studio 9 and above; it is ignored +This property only works for Visual Studio 12 and above; it is ignored on other generators. The property only applies when set on a directory whose ``CMakeLists.txt`` contains a :command:`project` command. diff --git a/Help/prop_sf/COMPILE_FLAGS.rst b/Help/prop_sf/COMPILE_FLAGS.rst index eefe7bff3a..1d3def47b4 100644 --- a/Help/prop_sf/COMPILE_FLAGS.rst +++ b/Help/prop_sf/COMPILE_FLAGS.rst @@ -5,8 +5,7 @@ Additional flags to be added when compiling this source file. The ``COMPILE_FLAGS`` property, managed as a string, sets additional compiler flags used that will be added to the list of compile flags when this source -file builds. The flags will be added after target-wide flags (except in -some cases not supported by the :generator:`Visual Studio 9 2008` generator). +file builds. The flags will be added after target-wide flags. Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions. diff --git a/Help/prop_sf/COMPILE_OPTIONS.rst b/Help/prop_sf/COMPILE_OPTIONS.rst index 84c543a2c1..9b00e0ebb9 100644 --- a/Help/prop_sf/COMPILE_OPTIONS.rst +++ b/Help/prop_sf/COMPILE_OPTIONS.rst @@ -7,8 +7,7 @@ List of additional options to pass to the compiler. This property holds a :ref:`semicolon-separated list ` of options and will be added to the list of compile flags when this source -file builds. The options will be added after target-wide options (except in -some cases not supported by the :generator:`Visual Studio 9 2008` generator). +file builds. The options will be added after target-wide options. Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual diff --git a/Help/prop_tgt/DEPLOYMENT_ADDITIONAL_FILES.rst b/Help/prop_tgt/DEPLOYMENT_ADDITIONAL_FILES.rst index f11fe7ce2b..afbee831a3 100644 --- a/Help/prop_tgt/DEPLOYMENT_ADDITIONAL_FILES.rst +++ b/Help/prop_tgt/DEPLOYMENT_ADDITIONAL_FILES.rst @@ -4,7 +4,7 @@ DEPLOYMENT_ADDITIONAL_FILES .. versionadded:: 3.13 Set the WinCE project ``AdditionalFiles`` in ``DeploymentTool`` in ``.vcproj`` -files generated by the :generator:`Visual Studio 9 2008` generator. +files generated by the :ref:`Visual Studio Generators`. This is useful when you want to debug on remote WinCE device. Specify additional files that will be copied to the device. For example: diff --git a/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst b/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst index 0680238217..3f691b1815 100644 --- a/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst +++ b/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst @@ -5,7 +5,7 @@ DEPLOYMENT_REMOTE_DIRECTORY Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and ``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated -by the :generator:`Visual Studio 9 2008` generator. +by the :ref:`Visual Studio Generators`. This is useful when you want to debug on remote WinCE device. For example: diff --git a/Help/prop_tgt/LINKER_TYPE.rst b/Help/prop_tgt/LINKER_TYPE.rst index 0a016fe839..23e1e4cf30 100644 --- a/Help/prop_tgt/LINKER_TYPE.rst +++ b/Help/prop_tgt/LINKER_TYPE.rst @@ -8,8 +8,7 @@ Specify which linker will be used for the link step. The property value may use .. include:: ../variable/LINKER_PREDEFINED_TYPES.txt -This property is not supported on :generator:`Green Hills MULTI` and -:generator:`Visual Studio 9 2008` generators. +This property is not supported on :generator:`Green Hills MULTI` generator. The implementation details for the selected linker will be provided by the :variable:`CMAKE__USING_LINKER_` variable. For example: diff --git a/Help/prop_tgt/VS_GLOBAL_KEYWORD.rst b/Help/prop_tgt/VS_GLOBAL_KEYWORD.rst index ce49316d8b..072475fa18 100644 --- a/Help/prop_tgt/VS_GLOBAL_KEYWORD.rst +++ b/Help/prop_tgt/VS_GLOBAL_KEYWORD.rst @@ -1,12 +1,9 @@ VS_GLOBAL_KEYWORD ----------------- -Visual Studio project keyword for VS 10 (2010) and newer. +Visual Studio project keyword. Sets the "keyword" attribute for a generated Visual Studio project. Defaults to "Win32Proj". You may wish to override this value with "ManagedCProj", for example, in a Visual Studio managed C++ unit test project. - -Use the :prop_tgt:`VS_KEYWORD` target property to set the -keyword for Visual Studio 9 (2008) and older. diff --git a/Help/prop_tgt/VS_KEYWORD.rst b/Help/prop_tgt/VS_KEYWORD.rst index f04d1091b2..b2ce78a690 100644 --- a/Help/prop_tgt/VS_KEYWORD.rst +++ b/Help/prop_tgt/VS_KEYWORD.rst @@ -1,10 +1,9 @@ VS_KEYWORD ---------- -Visual Studio project keyword for VS 9 (2008) and older. - -Can be set to change the visual studio keyword, for example Qt -integration works better if this is set to Qt4VSv1.0. +Removed. This once specified the Visual Studio project keyword +for the :generator:`Visual Studio 9 2008` generator, and older, +but all of those generators have been removed. Use the :prop_tgt:`VS_GLOBAL_KEYWORD` target property to set the keyword for Visual Studio 12 (2013) and newer. diff --git a/Help/release/dev/remove-vs9-generator.rst b/Help/release/dev/remove-vs9-generator.rst new file mode 100644 index 0000000000..2ff805cf43 --- /dev/null +++ b/Help/release/dev/remove-vs9-generator.rst @@ -0,0 +1,4 @@ +remove-vs9-generator +-------------------- + +* The :generator:`Visual Studio 9 2008` generator has been removed. diff --git a/Help/variable/CMAKE_CFG_INTDIR.rst b/Help/variable/CMAKE_CFG_INTDIR.rst index 3045d914a7..5a1f9e899f 100644 --- a/Help/variable/CMAKE_CFG_INTDIR.rst +++ b/Help/variable/CMAKE_CFG_INTDIR.rst @@ -18,7 +18,6 @@ Example values: :: - $(ConfigurationName) = Visual Studio 9 $(Configuration) = Visual Studio 12 and above $(CONFIGURATION) = Xcode . = Make-based tools diff --git a/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst b/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst index 721ceaac57..d4b256a36d 100644 --- a/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst +++ b/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst @@ -5,7 +5,7 @@ CMAKE_MSVCIDE_RUN_PATH Extra PATH locations that should be used when executing :command:`add_custom_command` or :command:`add_custom_target` when using the -:generator:`Visual Studio 9 2008` (or above) generator. This allows +:generator:`Visual Studio 12 2013` (or above) generator. This allows for running commands and using dll's that the IDE environment is not aware of. If not set explicitly the value is initialized by the ``CMAKE_MSVCIDE_RUN_PATH`` diff --git a/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst b/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst index 155931f8f6..95e09b1aed 100644 --- a/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst +++ b/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst @@ -1,7 +1,7 @@ CMAKE_VS_DEVENV_COMMAND ----------------------- -The generators for :generator:`Visual Studio 9 2008` and above set this +The generators for :generator:`Visual Studio 12 2013` and above set this variable to the ``devenv.com`` command installed with the corresponding Visual Studio version. Note that this variable may be empty on Visual Studio Express editions because they do not provide this tool. diff --git a/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst index ceedf2861d..485726991b 100644 --- a/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst +++ b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst @@ -1,7 +1,7 @@ CMAKE_VS_INTEL_Fortran_PROJECT_VERSION -------------------------------------- -When generating for :generator:`Visual Studio 9 2008` or greater with the Intel +When generating for :generator:`Visual Studio 12 2013` or greater with the Intel Fortran plugin installed, this specifies the ``.vfproj`` project file format version. This is intended for internal use by CMake and should not be used by project code. diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake index de682b7ed6..fe2729514f 100644 --- a/Modules/CheckIPOSupported.cmake +++ b/Modules/CheckIPOSupported.cmake @@ -257,11 +257,6 @@ function(check_ipo_supported) endif() endforeach() - if(CMAKE_GENERATOR MATCHES "^Visual Studio 9 ") - _ipo_not_supported("CMake doesn't support IPO for current generator") - return() - endif() - foreach(x ${languages}) _ipo_run_language_check(${x}) endforeach() diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8c57762fbe..9953caf0cf 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -886,8 +886,6 @@ if(WIN32) cmGlobalVisualStudio7Generator.h cmGlobalVisualStudio8Generator.cxx cmGlobalVisualStudio8Generator.h - cmGlobalVisualStudio9Generator.cxx - cmGlobalVisualStudio9Generator.h cmVisualStudioGeneratorOptions.h cmVisualStudioGeneratorOptions.cxx cmVsProjectType.h diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index c92ec4ef7a..7abe75a0df 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1275,12 +1275,6 @@ std::string cmGlobalVisualStudio10Generator::Encoding() const char* cmGlobalVisualStudio10Generator::GetToolsVersion() const { switch (this->Version) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: - return "4.0"; - - // in Visual Studio 2013 they detached the MSBuild tools version - // from the .Net Framework version and instead made it have it's own - // version number case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "12.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 8cbb573cf1..7e04b9f722 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -310,26 +310,6 @@ void cmGlobalVisualStudio7Generator::Generate() GetSLNFile(this->LocalGenerators[0].get())); } - if (this->Version == VSVersion::VS9 && - !this->CMakeInstance->GetIsInTryCompile()) { - std::string cmakeWarnVS9; - if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue( - "CMAKE_WARN_VS9")) { - this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS9"); - cmakeWarnVS9 = *cached; - } else { - cmSystemTools::GetEnv("CMAKE_WARN_VS9", cmakeWarnVS9); - } - if (cmakeWarnVS9.empty() || !cmIsOff(cmakeWarnVS9)) { - this->CMakeInstance->IssueMessage( - MessageType::WARNING, - "The \"Visual Studio 9 2008\" generator is deprecated " - "and will be removed in a future version of CMake." - "\n" - "Add CMAKE_WARN_VS9=OFF to the cache to disable this warning."); - } - } - if (this->Version == VSVersion::VS12 && !this->CMakeInstance->GetIsInTryCompile()) { std::string cmakeWarnVS12; diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx deleted file mode 100644 index de2153d083..0000000000 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ /dev/null @@ -1,163 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmGlobalVisualStudio9Generator.h" - -#include -#include -#include - -#include "cmGlobalGenerator.h" -#include "cmGlobalGeneratorFactory.h" -#include "cmGlobalVisualStudioGenerator.h" -#include "cmStringAlgorithms.h" -#include "cmSystemTools.h" -#include "cmVisualStudioWCEPlatformParser.h" - -class cmake; - -static const char vs9generatorName[] = "Visual Studio 9 2008"; - -class cmGlobalVisualStudio9Generator::Factory : public cmGlobalGeneratorFactory -{ -public: - std::unique_ptr CreateGlobalGenerator( - const std::string& name, bool allowArch, cmake* cm) const override - { - if (strncmp(name.c_str(), vs9generatorName, - sizeof(vs9generatorName) - 1) != 0) { - return std::unique_ptr(); - } - - const char* p = name.c_str() + sizeof(vs9generatorName) - 1; - if (p[0] == '\0') { - return std::unique_ptr( - new cmGlobalVisualStudio9Generator(cm, name, "")); - } - - if (!allowArch || p[0] != ' ') { - return std::unique_ptr(); - } - - ++p; - - if (!strcmp(p, "IA64")) { - return std::unique_ptr( - new cmGlobalVisualStudio9Generator(cm, name, "Itanium")); - } - - if (!strcmp(p, "Win64")) { - return std::unique_ptr( - new cmGlobalVisualStudio9Generator(cm, name, "x64")); - } - - cmVisualStudioWCEPlatformParser parser(p); - parser.ParseVersion("9.0"); - if (!parser.Found()) { - return std::unique_ptr(); - } - - auto ret = std::unique_ptr( - new cmGlobalVisualStudio9Generator(cm, name, p)); - ret->WindowsCEVersion = parser.GetOSVersion(); - return std::unique_ptr(std::move(ret)); - } - - cmDocumentationEntry GetDocumentation() const override - { - return { cmStrCat(vs9generatorName, " [arch]"), - "Deprecated. Generates Visual Studio 2008 project files. " - "Optional [arch] can be \"Win64\" or \"IA64\"." }; - } - - std::vector GetGeneratorNames() const override - { - std::vector names; - names.emplace_back(vs9generatorName); - return names; - } - - std::vector GetGeneratorNamesWithPlatform() const override - { - std::vector names; - names.emplace_back(cmStrCat(vs9generatorName, " Win64")); - names.emplace_back(cmStrCat(vs9generatorName, " IA64")); - cmVisualStudioWCEPlatformParser parser; - parser.ParseVersion("9.0"); - const std::vector& availablePlatforms = - parser.GetAvailablePlatforms(); - for (std::string const& i : availablePlatforms) { - names.emplace_back(cmStrCat("Visual Studio 9 2008 ", i)); - } - return names; - } - - bool SupportsToolset() const override { return false; } - bool SupportsPlatform() const override { return true; } - - std::vector GetKnownPlatforms() const override - { - std::vector platforms; - platforms.emplace_back("x64"); - platforms.emplace_back("Win32"); - platforms.emplace_back("Itanium"); - cmVisualStudioWCEPlatformParser parser; - parser.ParseVersion("9.0"); - const std::vector& availablePlatforms = - parser.GetAvailablePlatforms(); - for (std::string const& i : availablePlatforms) { - platforms.emplace_back(i); - } - return platforms; - } - - std::string GetDefaultPlatformName() const override { return "Win32"; } -}; - -std::unique_ptr -cmGlobalVisualStudio9Generator::NewFactory() -{ - return std::unique_ptr(new Factory); -} - -cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator( - cmake* cm, const std::string& name, - std::string const& platformInGeneratorName) - : cmGlobalVisualStudio8Generator(cm, name, platformInGeneratorName) -{ - this->Version = VSVersion::VS9; - std::string vc9Express; - this->ExpressEdition = cmSystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC;" - "ProductDir", - vc9Express, cmSystemTools::KeyWOW64_32); -} - -std::string cmGlobalVisualStudio9Generator::GetUserMacrosDirectory() -{ - std::string base; - std::string path; - - // base begins with the VisualStudioProjectsLocation reg value... - if (cmSystemTools::ReadRegistryValue( - "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\9.0;" - "VisualStudioProjectsLocation", - base)) { - cmSystemTools::ConvertToUnixSlashes(base); - - // 9.0 macros folder: - path = cmStrCat(base, "/VSMacros80"); - // *NOT* a typo; right now in Visual Studio 2008 beta the macros - // folder is VSMacros80... They may change it to 90 before final - // release of 2008 or they may not... we'll have to keep our eyes - // on it - } - - // path is (correctly) still empty if we did not read the base value from - // the Registry value - return path; -} - -std::string cmGlobalVisualStudio9Generator::GetUserMacrosRegKeyBase() -{ - return R"(Software\Microsoft\VisualStudio\9.0\vsmacros)"; -} diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h deleted file mode 100644 index 1c93d49bad..0000000000 --- a/Source/cmGlobalVisualStudio9Generator.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#pragma once - -#include -#include - -#include "cmGlobalVisualStudio8Generator.h" - -class cmGlobalGeneratorFactory; -class cmake; - -/** \class cmGlobalVisualStudio9Generator - * \brief Write a Unix makefiles. - * - * cmGlobalVisualStudio9Generator manages UNIX build process for a tree - */ -class cmGlobalVisualStudio9Generator : public cmGlobalVisualStudio8Generator -{ -public: - static std::unique_ptr NewFactory(); - - /** - * Where does this version of Visual Studio look for macros for the - * current user? Returns the empty string if this version of Visual - * Studio does not implement support for VB macros. - */ - std::string GetUserMacrosDirectory() override; - - /** - * What is the reg key path to "vsmacros" for this version of Visual - * Studio? - */ - std::string GetUserMacrosRegKeyBase() override; - -protected: - cmGlobalVisualStudio9Generator(cmake* cm, const std::string& name, - std::string const& platformInGeneratorName); - -private: - class Factory; - friend class Factory; -}; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6fdc32c78a..f96a84c885 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -104,8 +104,6 @@ std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const { switch (this->Version) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: - return "9.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "12.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -127,10 +125,6 @@ void cmGlobalVisualStudioGenerator::WriteSLNHeader(std::ostream& fout) fout << '\n'; switch (this->Version) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: - fout << "Microsoft Visual Studio Solution File, Format Version 10.00\n"; - fout << "# Visual Studio 2008\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 76713fa725..4746f1342f 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -34,7 +34,6 @@ public: /** Known versions of Visual Studio. */ enum class VSVersion : uint16_t { - VS9 = 90, VS12 = 120, /* VS13 = 130 was skipped */ VS14 = 140, diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index d816d7beaf..b4683aa055 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -125,8 +125,6 @@ static unsigned int VSVersionToMajor( cmGlobalVisualStudioGenerator::VSVersion v) { switch (v) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: - return 9; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return 12; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -145,8 +143,6 @@ static const char* VSVersionToToolset( cmGlobalVisualStudioGenerator::VSVersion v) { switch (v) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: - return "v90"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "v120"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -165,8 +161,6 @@ static std::string VSVersionToMajorString( cmGlobalVisualStudioGenerator::VSVersion v) { switch (v) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: - return "9"; case cmGlobalVisualStudioGenerator::VSVersion::VS12: return "12"; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -185,7 +179,6 @@ static const char* VSVersionToAndroidToolset( cmGlobalVisualStudioGenerator::VSVersion v) { switch (v) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: case cmGlobalVisualStudioGenerator::VSVersion::VS12: return ""; case cmGlobalVisualStudioGenerator::VSVersion::VS14: @@ -485,7 +478,6 @@ bool cmGlobalVisualStudioVersionedGenerator::MatchesGeneratorName( { std::string genName; switch (this->Version) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS14: break; @@ -752,7 +744,6 @@ cmGlobalVisualStudioVersionedGenerator::GetAndroidApplicationTypeRevision() const { switch (this->Version) { - case cmGlobalVisualStudioGenerator::VSVersion::VS9: case cmGlobalVisualStudioGenerator::VSVersion::VS12: return ""; case cmGlobalVisualStudioGenerator::VSVersion::VS14: diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index e52539e806..8577cc429f 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1133,12 +1133,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n"; } if (this->WindowsCEProject) { - if (this->GetVersion() < - cmGlobalVisualStudioGenerator::VSVersion::VS9) { - fout << "\t\t\t\tSubSystem=\"9\"\n"; - } else { - fout << "\t\t\t\tSubSystem=\"8\"\n"; - } + fout << "\t\t\t\tSubSystem=\"8\"\n"; } std::string stackVar = cmStrCat("CMAKE_", linkLanguage, "_STACK_SIZE"); cmValue stackVal = this->Makefile->GetDefinition(stackVar); @@ -1221,12 +1216,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n"; } if (this->WindowsCEProject) { - if (this->GetVersion() < - cmGlobalVisualStudioGenerator::VSVersion::VS9) { - fout << "\t\t\t\tSubSystem=\"9\"\n"; - } else { - fout << "\t\t\t\tSubSystem=\"8\"\n"; - } + fout << "\t\t\t\tSubSystem=\"8\"\n"; if (!linkOptions.GetFlag("EntryPointSymbol")) { const char* entryPointSymbol = targetOptions.UsingUnicode() diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index cb08b217fc..a5f2cdfb63 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -26,7 +26,6 @@ cmVisualStudioGeneratorOptions::cmVisualStudioGeneratorOptions( cmVS7FlagTable const* extraTable) : cmIDEOptions() , LocalGenerator(lg) - , Version(lg->GetVersion()) , CurrentTool(tool) { // Store the given flag tables. @@ -75,8 +74,7 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault() // initialization to off, but the user has the option of removing // the flag to disable exception handling. When the user does // remove the flag we need to override the IDE default of on. - if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && - !this->LocalGenerator->IsVFProj()) { + if (!this->LocalGenerator->IsVFProj()) { // by default VS puts empty // for a project, to make our projects look the same put a new line // and space over for the closing as the default @@ -94,15 +92,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 9, the value of this attribute should be + // In '.vfproj' files, 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::VS9 && - !this->LocalGenerator->IsVFProj() - ? "" - : "FALSE"; + !this->LocalGenerator->IsVFProj() ? "" : "FALSE"; } } @@ -369,15 +364,13 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( } std::ostringstream oss; - if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && - !this->LocalGenerator->IsVFProj()) { + if (!this->LocalGenerator->IsVFProj()) { oss << "%(" << tag << ')'; } auto de = cmRemoveDuplicates(this->Defines); for (std::string const& di : cmMakeRange(this->Defines.cbegin(), de)) { std::string define; - if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && - !this->LocalGenerator->IsVFProj()) { + if (!this->LocalGenerator->IsVFProj()) { // Escape the definition for MSBuild. define = di; cmVS10EscapeForMSBuild(define); @@ -424,8 +417,7 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories( } // Escape this include for the MSBuild. - if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && - !this->LocalGenerator->IsVFProj()) { + if (!this->LocalGenerator->IsVFProj()) { cmVS10EscapeForMSBuild(include); } oss << sep << include; @@ -437,8 +429,7 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories( } } - if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && - !this->LocalGenerator->IsVFProj()) { + if (!this->LocalGenerator->IsVFProj()) { oss << sep << "%(" << tag << ')'; } @@ -452,8 +443,7 @@ void cmVisualStudioGeneratorOptions::OutputFlagMap(std::ostream& fout, std::ostringstream oss; const char* sep = ""; for (std::string i : m.second) { - if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && - !this->LocalGenerator->IsVFProj()) { + if (!this->LocalGenerator->IsVFProj()) { cmVS10EscapeForMSBuild(i); } oss << sep << i; diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 1ca569ddac..409fd62d35 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -87,7 +87,6 @@ protected: private: cmLocalVisualStudioGenerator* LocalGenerator; - cmGlobalVisualStudioGenerator::VSVersion Version; std::string Configuration; Tool CurrentTool; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 319e5971aa..2d09e74a8f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -97,7 +97,6 @@ # include "cmGlobalNMakeMakefileGenerator.h" # include "cmGlobalVisualStudio12Generator.h" # include "cmGlobalVisualStudio14Generator.h" -# include "cmGlobalVisualStudio9Generator.h" # include "cmGlobalVisualStudioVersionedGenerator.h" # include "cmVSSetupHelper.h" @@ -2636,7 +2635,6 @@ std::unique_ptr cmake::EvaluateDefaultGlobalGenerator() static VSVersionedGenerator const vsGenerators[] = { { "14.0", "Visual Studio 14 2015" }, // { "12.0", "Visual Studio 12 2013" }, // - { "9.0", "Visual Studio 9 2008" } }; static const char* const vsEntries[] = { "\\Setup\\VC;ProductDir", // @@ -3021,7 +3019,6 @@ void cmake::AddDefaultGenerators() cmGlobalVisualStudioVersionedGenerator::NewFactory15()); this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory()); - this->Generators.push_back(cmGlobalVisualStudio9Generator::NewFactory()); this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalJOMMakefileGenerator::NewFactory()); @@ -3781,22 +3778,12 @@ int cmake::Build(int jobs, std::string dir, std::vector targets, // itself, there is the risk of building an out-of-date solution file due // to limitations of the underlying build system. std::string const stampList = cachePath + "/" + "CMakeFiles/" + - cmGlobalVisualStudio9Generator::GetGenerateStampList(); + cmGlobalVisualStudio12Generator::GetGenerateStampList(); // Note that the stampList file only exists for VS generators. if (cmSystemTools::FileExists(stampList)) { - // Check if running for Visual Studio 9 - we need to explicitly run - // the glob verification script before starting the build this->AddScriptingCommands(); - if (this->GlobalGenerator->MatchesGeneratorName("Visual Studio 9 2008")) { - std::string const globVerifyScript = - cachePath + "/" + "CMakeFiles/" + "VerifyGlobs.cmake"; - if (cmSystemTools::FileExists(globVerifyScript)) { - std::vector args; - this->ReadListFile(args, globVerifyScript); - } - } if (!cmakeCheckStampList(stampList)) { // Correctly initialize the home (=source) and home output (=binary) diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index dbafc85047..99418df365 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -42,7 +42,7 @@ list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}") list(APPEND _cmake_options "-DCMAKE_FORCE_DEPFILES=1") -if(NOT CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") +if(NOT CMAKE_GENERATOR MATCHES "Visual Studio") set(TEST_MULTI3 1) list(APPEND _cmake_options "-DTEST_MULTI3=1") endif() diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a75f6c2605..d31f96d86d 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -40,9 +40,7 @@ set(ENV{HOME} \"${TEST_HOME}\") endif() # Suppress generator deprecation warnings in test suite. -if(CMAKE_GENERATOR MATCHES "^Visual Studio 9 2008") - set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS9} OFF)") -elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 12 2013") +if(CMAKE_GENERATOR MATCHES "^Visual Studio 12 2013") set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS12} OFF)") else() set(TEST_WARN_VS_CODE "") @@ -74,9 +72,6 @@ if(BUILD_TESTING) set(CMake_TEST_DEVENV "") if(CMAKE_VS_DEVENV_COMMAND) set(CMake_TEST_DEVENV "${CMAKE_VS_DEVENV_COMMAND}") - elseif(CMAKE_GENERATOR MATCHES "Visual Studio 9 " AND - NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") - set(CMake_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}") endif() if(CMAKE_GENERATOR MATCHES "Visual Studio|Xcode") @@ -472,7 +467,7 @@ if(BUILD_TESTING) add_subdirectory(ObjCXX) endif() - if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") ADD_TEST_MACRO(CSharpOnly CSharpOnly) if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx) @@ -2209,8 +2204,6 @@ if(BUILD_TESTING) endif() if(MSVC AND NOT MSVC_VERSION LESS 1310 - AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 " - OR CMAKE_SIZEOF_VOID_P EQUAL 4) AND (NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") ) ADD_TEST_MACRO(VSMASM VSMASM) @@ -2221,8 +2214,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(SBCS SBCS) endif() - if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio 9 " - AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90" + if(NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90" AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) ADD_TEST_MACRO(VSManagedCustomCommand) @@ -2373,7 +2365,7 @@ if(BUILD_TESTING) endif() endif() - if(CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])" AND nasm) + if(CMAKE_GENERATOR MATCHES "Visual Studio" AND nasm) ADD_TEST_MACRO(VSNASM VSNASM) endif() diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index ea06464342..727c7fcbc2 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -54,7 +54,7 @@ if(CMAKE_Fortran_COMPILER) add_CMakeOnly_test(CompilerIdFortran) set_property(TEST CMakeOnly.CompilerIdFortran APPEND PROPERTY LABELS "Fortran") endif() -if(CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") +if(CMAKE_GENERATOR MATCHES "Visual Studio") add_CMakeOnly_test(CompilerIdCSharp) endif() diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 0fbfb83716..ad2075e2af 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -74,10 +74,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang|MSVC)$") endif() set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS "-DFLAG_B=2" "-DFLAG_C=2" "-DFLAG_D=1") set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_D=2") - if(NOT CMAKE_GENERATOR MATCHES "^Visual Studio 9") - set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_E=1") - set_property(SOURCE main.cpp PROPERTY COMPILE_OPTIONS "-DFLAG_E=2") - endif() + set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_E=1") + set_property(SOURCE main.cpp PROPERTY COMPILE_OPTIONS "-DFLAG_E=2") endif() target_link_libraries(CompileOptions testlib) diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index e82cea2fe9..99cad41497 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -98,8 +98,8 @@ if(NOT CMAKE_GENERATOR MATCHES "(Borland|NMake) Makefiles") # NMake and Borland seem to have no way to encode a single '^'. string(APPEND special_chars "^") endif() -if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 2008|Watcom WMake") - # The vcproj format separates values with ','. +if(NOT CMAKE_GENERATOR MATCHES "Watcom WMake") + # The wmake format does not support ','. string(APPEND special_chars ",") endif() if(NOT WIN32 AND NOT CYGWIN) diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index fada37a445..a5f9622553 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -180,8 +180,7 @@ if (RunCMake_GENERATOR MATCHES "Makefiles") unset(RunCMake_TEST_NO_CLEAN) endif() -if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode" AND - NOT RunCMake_GENERATOR MATCHES "Visual Studio (9|10)( |$)") +if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode") unset(run_BuildDepends_skip_step_3) run_BuildDepends(CustomCommandDepfile) set(run_BuildDepends_skip_step_3 1) @@ -191,8 +190,7 @@ if(RunCMake_GENERATOR MATCHES "Make") run_BuildDepends(MakeDependencies) endif() -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR - (RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7)) +if(RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7) # This build tool misses the dependency. set(run_BuildDepends_skip_step_2 1) endif() diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-result.txt b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-result.txt deleted file mode 100644 index d00491fd7e..0000000000 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt deleted file mode 100644 index 1159ec043d..0000000000 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Error at CMP0069-NEW-generator\.cmake:[0-9]+ \(add_executable\): - CMake doesn't support IPO for current generator -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake deleted file mode 100644 index 80d4e15441..0000000000 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake +++ /dev/null @@ -1,7 +0,0 @@ -cmake_policy(SET CMP0069 NEW) - -set(_CMAKE_CXX_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_CXX_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) - -add_executable(foo main.cpp) -set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) diff --git a/Tests/RunCMake/CMP0069/RunCMakeTest.cmake b/Tests/RunCMake/CMP0069/RunCMakeTest.cmake index 456e6a6565..61283252c3 100644 --- a/Tests/RunCMake/CMP0069/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0069/RunCMakeTest.cmake @@ -4,7 +4,3 @@ run_cmake(CMP0069-OLD) run_cmake(CMP0069-NEW-cmake) run_cmake(CMP0069-NEW-compiler) run_cmake(CMP0069-WARN) - -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - run_cmake(CMP0069-NEW-generator) -endif() diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 192675ea1f..39f7fb9e05 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -736,13 +736,7 @@ endif() if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") add_RunCMake_test(CMAKE_MSVCIDE_RUN_PATH) add_RunCMake_test(include_external_msproject -DVS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME}) - if("${CMAKE_GENERATOR}" MATCHES "Visual Studio (9|10)" AND NOT CMAKE_VS_DEVENV_COMMAND) - set(NO_USE_FOLDERS 1) - endif() - add_RunCMake_test(VSSolution -DNO_USE_FOLDERS=${NO_USE_FOLDERS}) -endif() - -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([^9]|9[0-9])") + add_RunCMake_test(VSSolution) add_RunCMake_test(VS10Project -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION} @@ -1163,7 +1157,7 @@ if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN) set_property(TEST RunCMake.Android PROPERTY TIMEOUT ${CMake_TEST_ANDROID_TIMEOUT}) endif() -if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|9[0-9])") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio") add_RunCMake_test(CSharpCustomCommand) if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") add_RunCMake_test(CSharpReferenceImport) diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake index 42a4ed99f6..2ec0a43ab3 100644 --- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake @@ -262,15 +262,13 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio ") run_cmake_presets(VisualStudioWin32) run_cmake_presets(VisualStudioWin64) run_cmake_presets(VisualStudioWin32Override -A x64) - if(NOT RunCMake_GENERATOR STREQUAL "Visual Studio 9 2008") - run_cmake_presets(VisualStudioToolset) - run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset") - run_cmake_presets(VisualStudioInheritanceParent) - run_cmake_presets(VisualStudioInheritanceChild) - run_cmake_presets(VisualStudioInheritanceOverride) - run_cmake_presets(VisualStudioInheritanceMulti) - run_cmake_presets(VisualStudioInheritanceMultiSecond) - endif() + run_cmake_presets(VisualStudioToolset) + run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset") + run_cmake_presets(VisualStudioInheritanceParent) + run_cmake_presets(VisualStudioInheritanceChild) + run_cmake_presets(VisualStudioInheritanceOverride) + run_cmake_presets(VisualStudioInheritanceMulti) + run_cmake_presets(VisualStudioInheritanceMultiSecond) else() run_cmake_presets(ArchToolsetStrategyNone) run_cmake_presets(ArchToolsetStrategyDefault) diff --git a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake index 2fb159e919..1dcf0ef5b3 100644 --- a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake @@ -12,13 +12,8 @@ run_cmake(save-to-result) run_cmake(cmp0069-is-old) if(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE - AND _CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER - AND NOT RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") + AND _CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER) run_cmake(CMP0138-WARN) run_cmake(CMP0138-OLD) run_cmake(CMP0138-NEW) endif() - -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - run_cmake(not-supported-by-generator) -endif() diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt deleted file mode 100644 index d00491fd7e..0000000000 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt deleted file mode 100644 index a2aa58c7ba..0000000000 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\): - IPO is not supported \(CMake doesn't support IPO for current generator\)\. -Call Stack \(most recent call first\): - .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\) - not-supported-by-generator\.cmake:[0-9]+ \(check_ipo_supported\) - CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake deleted file mode 100644 index c32af6ed3b..0000000000 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake +++ /dev/null @@ -1,6 +0,0 @@ -project(${RunCMake_TEST} LANGUAGES C) - -set(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) - -check_ipo_supported() diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt deleted file mode 100644 index c3329a0ed8..0000000000 --- a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Warning: - The "Visual Studio 9 2008" generator is deprecated and will be removed in a - future version of CMake. - - Add CMAKE_WARN_VS9=OFF to the cache to disable this warning.$ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt b/Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt deleted file mode 100644 index 4eae6aa10b..0000000000 --- a/Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CMake Error at CMakeLists.+ - No CMAKE_C_COMPILER could be found. diff --git a/Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt b/Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt deleted file mode 100644 index 4eae6aa10b..0000000000 --- a/Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CMake Error at CMakeLists.+ - No CMAKE_C_COMPILER could be found. diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 7b34773cab..8a5a25ac2c 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -393,16 +393,10 @@ function(run_EnvironmentGenerator) # Envvar shouldn't affect existing build tree run_cmake_command(Envgen-platform-existing ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build Envgen-build) - if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - set(RunCMake-stderr-file "Envgen-platform-invalid-stderr-vs9.txt") - endif() run_cmake_command(Envgen-platform-invalid ${CMAKE_COMMAND} ${source_dir}) unset(RunCMake-stderr-file) # Command line -G implies -A"" run_cmake_command(Envgen-G-implicit-platform ${CMAKE_COMMAND} -G "${RunCMake_GENERATOR}" ${source_dir}) - if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - set(RunCMake-stderr-file "Envgen-A-platform-stderr-vs9.txt") - endif() run_cmake_command(Envgen-A-platform ${CMAKE_COMMAND} -A "fromcli" ${source_dir}) unset(RunCMake-stderr-file) unset(ENV{CMAKE_GENERATOR_PLATFORM}) @@ -1124,13 +1118,6 @@ set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${P run_cmake(ProfilingTest) unset(RunCMake_TEST_OPTIONS) -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 2008") - run_cmake_with_options(DeprecateVS9-WARN-ON -DCMAKE_WARN_VS9=ON) - unset(ENV{CMAKE_WARN_VS9}) - run_cmake(DeprecateVS9-WARN-ON) - run_cmake_with_options(DeprecateVS9-WARN-OFF -DCMAKE_WARN_VS9=OFF) -endif() - if(RunCMake_GENERATOR MATCHES "^Visual Studio 12 2013") run_cmake_with_options(DeprecateVS12-WARN-ON -DCMAKE_WARN_VS12=ON) unset(ENV{CMAKE_WARN_VS12}) diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index f16e4797c5..44c6f74c12 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -213,7 +213,7 @@ function(__ep_test_BUILD_ALWAYS) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-configure.cmake" [[message(FATAL_ERROR "once: configure should not run again")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-build.cmake" [[message(FATAL_ERROR "once: build should not run again")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-install.cmake" [[message(FATAL_ERROR "once: install should not run again")]]) - if(NOT RunCMake_GENERATOR MATCHES "^(Xcode|Visual Studio 9 )") + if(NOT RunCMake_GENERATOR STREQUAL "Xcode") # The Xcode and VS 9 build systems decide to run this every time. file(WRITE "${RunCMake_TEST_BINARY_DIR}/always-configure.cmake" [[message(FATAL_ERROR "always: configure should not run again")]]) endif() @@ -247,9 +247,7 @@ function(__ep_test_CONFIGURE_HANDLED_BY_BUILD) run_cmake_command(CONFIGURE_HANDLED_BY_BUILD-rebuild ${CMAKE_COMMAND} --build . ${BUILD_CONFIG}) endfunction() -if(NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 ") - __ep_test_CONFIGURE_HANDLED_BY_BUILD() -endif() +__ep_test_CONFIGURE_HANDLED_BY_BUILD() find_package(Git QUIET) if(GIT_EXECUTABLE) diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake index d8965f7493..b1c758ada6 100644 --- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake @@ -3,7 +3,7 @@ include(RunCMake) set(RunCMake_GENERATOR_PLATFORM "") run_cmake(NoPlatform) -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124567])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio [0-9]+( 20[0-9][0-9])?$") set(RunCMake_GENERATOR_PLATFORM "x64") run_cmake(x64Platform) else() @@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -A "Test Platform" -A "Extra Platform") run_cmake(TwoPlatforms) unset(RunCMake_TEST_OPTIONS) -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124567])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio [0-9]+( 20[0-9][0-9])?$") set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake) run_cmake(TestPlatformToolchain) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake index 17f4c86154..08cc27486f 100644 --- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake @@ -362,10 +362,7 @@ foreach(DISCOVERY_MODE POST_BUILD PRE_TEST) run_GoogleTestXML(${DISCOVERY_MODE}) message("Testing ${DISCOVERY_MODE} discovery mode via DISCOVERY_MODE option...") run_GoogleTest_discovery_timeout(${DISCOVERY_MODE}) - if(# VS 9 does not rebuild if POST_BUILD command changes. - NOT "${DISCOVERY_MODE};${RunCMake_GENERATOR}" MATCHES "^POST_BUILD;Visual Studio 9") - run_GoogleTest_discovery_arg_change(${DISCOVERY_MODE}) - endif() + run_GoogleTest_discovery_arg_change(${DISCOVERY_MODE}) run_GoogleTest_discovery_test_list(${DISCOVERY_MODE}) run_GoogleTest_discovery_test_list_scoped(${DISCOVERY_MODE}) run_GoogleTest_discovery_flush_script(${DISCOVERY_MODE}) diff --git a/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake b/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake index 0a3f01c3b9..c57e72763f 100644 --- a/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake +++ b/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake @@ -1,10 +1,5 @@ include(RunCMake) -if (RunCMake_GENERATOR MATCHES "Visual Studio 9 2008") - run_cmake(UnsupportedLinkerType) - return() -endif() - run_cmake(InvalidLinkerType1) run_cmake(InvalidLinkerType2) diff --git a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-result.txt b/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-result.txt deleted file mode 100644 index d00491fd7e..0000000000 --- a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt b/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt deleted file mode 100644 index 6473451d25..0000000000 --- a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -CMake Error at UnsupportedLinkerType.cmake:[0-9]+ \(add_executable\): - 'LINKER_TYPE' property, specified on target 'main', is not supported by - this generator. diff --git a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake b/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake deleted file mode 100644 index 1b0703cd3c..0000000000 --- a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -enable_language(C) - -set(CMAKE_LINKER_TYPE LDD) -add_executable(main main.c) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake index 9514c97030..d50d403f1e 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake @@ -26,8 +26,7 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows|AIX|SunOS)$|BSD" AND NOT CMAKE_C_COMPILER_ID MATCHES "^(Borland|Embarcadero|OpenWatcom|OrangeC|Watcom)$" AND NOT (CMAKE_C_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$" AND CMAKE_SYSTEM_NAME STREQUAL "Windows") - AND NOT CMAKE_C_COMPILER_LINKER MATCHES "Visual Studio 9\\.0" - AND NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 " + AND NOT CMAKE_C_COMPILER_LINKER MATCHES "Microsoft Visual Studio 9\\.0/VC/bin" ) if(NOT CMAKE_C_COMPILER_LINKER OR NOT CMAKE_C_COMPILER_LINKER_ID OR NOT CMAKE_C_COMPILER_LINKER_VERSION) message(SEND_ERROR "C compiler's linker not identified:\n" diff --git a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake index 134821d644..8737c9a2f9 100644 --- a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake +++ b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake @@ -13,9 +13,7 @@ run_cmake(StartupProject) run_cmake(StartupProjectMissing) run_cmake(AddPackageToDefault) -if(NOT NO_USE_FOLDERS) - run_cmake(StartupProjectUseFolders) - run_cmake(CMP0143-WARN) - run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD") - run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW") -endif() +run_cmake(StartupProjectUseFolders) +run_cmake(CMP0143-WARN) +run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD") +run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW") diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake index 713b269ad2..46e7baea1a 100644 --- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake @@ -19,7 +19,7 @@ run_cmake(TargetImported) run_cmake(TargetLiteralQuotes) run_cmake(TargetNotInDir) -if(${RunCMake_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") +if(RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(RemoveEmptyCommands) endif() diff --git a/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake b/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake index 0b3576d136..76dff4f1bf 100644 --- a/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake @@ -16,7 +16,7 @@ run_cmake(Debian6) run_cmake(UserFallbackScript) -if(RunCMake_GENERATOR MATCHES "^Visual Studio " AND NOT RunCMake_GENERATOR STREQUAL "Visual Studio 9 2008") +if(RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(VsMSBuild) else() run_cmake(VsMSBuildMissing) diff --git a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake index 4fbf147ef2..b8c6d75ed6 100644 --- a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake @@ -6,7 +6,7 @@ run_cmake(CustomTypePlatform) run_cmake(CustomGuidTypePlatform) run_cmake(CustomConfig) -if(RunCMake_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") +if(RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(SkipGetTargetFrameworkProperties) run_cmake(VSCSharpReference) endif()