Merge topic 'remove-vs12-generator'

241f923a6f Drop Visual Studio 12 2013 generator
7c1b671c3a Tests: Disable VSXaml test pending update to newer VS versions
9042aa1af5 Tests: Remove WinCE tests
810e33f67a Tests: Simplify tests for Visual Studio generators
1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9782
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 6169038..a69c8dc 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -583,7 +583,7 @@
   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 12 2013 (and newer)** generators these command
+  For :ref:`Visual Studio 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/envvar/CMAKE_MSVCIDE_RUN_PATH.rst b/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
index 82bd007..bb04b30 100644
--- a/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
+++ b/Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
@@ -4,7 +4,7 @@
 .. include:: ENV_VAR.txt
 
 Extra PATH locations for custom commands when using
-:generator:`Visual Studio 12 2013` (or above) generators.
+:ref:`Visual Studio 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 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst
index 522522c..8d3b2c8 100644
--- a/Help/generator/Visual Studio 12 2013.rst
+++ b/Help/generator/Visual Studio 12 2013.rst
@@ -1,57 +1,8 @@
 Visual Studio 12 2013
 ---------------------
 
-Deprecated.  Generates Visual Studio 12 (VS 2013) 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 12 2013 tools
-  using the :generator:`Visual Studio 14 2015` (or above) generator
-  with :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v120``, 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 12" 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 (JavaScript,
-Powershell, Python, 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 12 2013" -A Win32``
-  * ``cmake -G "Visual Studio 12 2013" -A x64``
-  * ``cmake -G "Visual Studio 12 2013" -A ARM``
-
-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 12 2013 Win64``
-  Specify target platform ``x64``.
-
-``Visual Studio 12 2013 ARM``
-  Specify target platform ``ARM``.
-
-Toolset Selection
-^^^^^^^^^^^^^^^^^
-
-The ``v120`` toolset that comes with Visual Studio 12 2013 is selected by
-default.  The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
-via the :option:`cmake -T` option, to specify another toolset.
-
-.. |VS_TOOLSET_HOST_ARCH_DEFAULT| replace::
-   By default this generator uses the 32-bit variant even on a 64-bit host.
-
-.. include:: VS_TOOLSET_HOST_ARCH_LEGACY.txt
+Removed.  This once generated Visual Studio 12 2013 project files, but
+the generator has been removed since CMake 3.31.  It is still possible
+to build with VS 12 2013 tools using the :generator:`Visual Studio 14 2015`
+(or above) generator with :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v120``,
+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 c36306d..5b32673 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 @@
 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 12 and above; it is ignored
+This property only works for :ref:`Visual Studio Generators`; 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 c775ad5..179f1bb 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 @@
 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 12 and above; it is ignored
+This property only works for :ref:`Visual Studio Generators`; 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_tgt/VS_DEBUGGER_COMMAND.rst b/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst
index 8c136f2..75ff850 100644
--- a/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst
+++ b/Help/prop_tgt/VS_DEBUGGER_COMMAND.rst
@@ -11,5 +11,5 @@
 :variable:`CMAKE_VS_DEBUGGER_COMMAND` if it is set when a target is
 created.
 
-This property only works for Visual Studio 12 2013 and above;
+This property only works for :ref:`Visual Studio Generators`;
 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 2656826..f49cb70 100644
--- a/Help/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.rst
+++ b/Help/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.rst
@@ -11,5 +11,5 @@
 :variable:`CMAKE_VS_DEBUGGER_COMMAND_ARGUMENTS` if it is set when a target is
 created.
 
-This property only works for Visual Studio 12 2013 and above;
+This property only works for :ref:`Visual Studio Generators`;
 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 d78d594..0352cd3 100644
--- a/Help/prop_tgt/VS_DEBUGGER_ENVIRONMENT.rst
+++ b/Help/prop_tgt/VS_DEBUGGER_ENVIRONMENT.rst
@@ -11,5 +11,5 @@
 :variable:`CMAKE_VS_DEBUGGER_ENVIRONMENT` if it is set when a target is
 created.
 
-This property only works for Visual Studio 12 2013 and above;
+This property only works for :ref:`Visual Studio Generators`;
 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 1026dfa..dbf5442 100644
--- a/Help/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.rst
+++ b/Help/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.rst
@@ -11,5 +11,5 @@
 :variable:`CMAKE_VS_DEBUGGER_WORKING_DIRECTORY` if it is set when a target is
 created.
 
-This property only works for Visual Studio 12 2013 and above;
+This property only works for :ref:`Visual Studio Generators`;
 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 eeb7dda..8c69fdc 100644
--- a/Help/prop_tgt/VS_DOTNET_STARTUP_OBJECT.rst
+++ b/Help/prop_tgt/VS_DOTNET_STARTUP_OBJECT.rst
@@ -12,7 +12,7 @@
 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 12 2013 and above;
+This property only works for :ref:`Visual Studio Generators`;
 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 b2ce78a..8fbebfe 100644
--- a/Help/prop_tgt/VS_KEYWORD.rst
+++ b/Help/prop_tgt/VS_KEYWORD.rst
@@ -6,4 +6,4 @@
 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.
+keyword for remaining :ref:`Visual Studio Generators`.
diff --git a/Help/release/dev/remove-vs12-generator.rst b/Help/release/dev/remove-vs12-generator.rst
new file mode 100644
index 0000000..fdbdc07
--- /dev/null
+++ b/Help/release/dev/remove-vs12-generator.rst
@@ -0,0 +1,4 @@
+remove-vs12-generator
+---------------------
+
+* The :generator:`Visual Studio 12 2013` generator has been removed.
diff --git a/Help/variable/CMAKE_CFG_INTDIR.rst b/Help/variable/CMAKE_CFG_INTDIR.rst
index 5a1f9e8..677538d 100644
--- a/Help/variable/CMAKE_CFG_INTDIR.rst
+++ b/Help/variable/CMAKE_CFG_INTDIR.rst
@@ -18,7 +18,7 @@
 
 ::
 
-  $(Configuration)     = Visual Studio 12 and above
+  $(Configuration)     = Visual Studio
   $(CONFIGURATION)     = Xcode
   .                    = Make-based tools
   .                    = Ninja
diff --git a/Help/variable/CMAKE_MAKE_PROGRAM.rst b/Help/variable/CMAKE_MAKE_PROGRAM.rst
index 9769c7a..df0b1b9 100644
--- a/Help/variable/CMAKE_MAKE_PROGRAM.rst
+++ b/Help/variable/CMAKE_MAKE_PROGRAM.rst
@@ -30,8 +30,7 @@
   the CMake cache then CMake will use the specified value.
 
 * The :ref:`Visual Studio Generators` set this to the full path to
-  ``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9), or
-  ``VCExpress.exe`` (VS Express 8,9).
+  ``MSBuild.exe`` or ``devenv.com``.
   (See also variables
   :variable:`CMAKE_VS_MSBUILD_COMMAND` and
   :variable:`CMAKE_VS_DEVENV_COMMAND`.
@@ -39,9 +38,9 @@
   These generators prefer to lookup the build tool at build time
   rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
   ahead of time.  This is because the tools are version-specific
-  and can be located using the Windows Registry.  It is also
+  and can be located using the Visual Studio Installer.  It is also
   necessary because the proper build tool may depend on the
-  project content (e.g. the Intel Fortran plugin to VS 10 and 11
+  project content (e.g. the Intel Fortran plugin to Visual Studio
   requires ``devenv.com`` to build its ``.vfproj`` project files
   even though ``MSBuild.exe`` is normally preferred to support
   the :variable:`CMAKE_GENERATOR_TOOLSET`).
diff --git a/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst b/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst
index d4b256a..22d640a 100644
--- a/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst
+++ b/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst
@@ -4,8 +4,8 @@
 .. versionadded:: 3.10
 
 Extra PATH locations that should be used when executing
-:command:`add_custom_command` or :command:`add_custom_target` when using the
-:generator:`Visual Studio 12 2013` (or above) generator. This allows
+:command:`add_custom_command` or :command:`add_custom_target` when using
+:ref:`Visual Studio Generators`.  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 95e09b1..7aecc25 100644
--- a/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst
+++ b/Help/variable/CMAKE_VS_DEVENV_COMMAND.rst
@@ -1,14 +1,11 @@
 CMAKE_VS_DEVENV_COMMAND
 -----------------------
 
-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.
+The :ref:`Visual Studio Generators` set this variable to the ``devenv.com``
+command installed with the corresponding Visual Studio version.
 
 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 12 2013` and above.
-See also the :variable:`CMAKE_MAKE_PROGRAM` variable.
+See also the :variable:`CMAKE_VS_MSBUILD_COMMAND` and
+:variable:`CMAKE_MAKE_PROGRAM` variables.
diff --git a/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
index 4857269..a2f072c 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 12 2013` or greater with the Intel
+When generating for :generator:`Visual Studio 14 2015` 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/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst b/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst
index 96924d5..32a56c7 100644
--- a/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst
+++ b/Help/variable/CMAKE_VS_MSBUILD_COMMAND.rst
@@ -1,13 +1,11 @@
 CMAKE_VS_MSBUILD_COMMAND
 ------------------------
 
-The generators for :generator:`Visual Studio 12 2013` and above set this
-variable to the ``MSBuild.exe`` command installed with the corresponding
-Visual Studio version.
+The :ref:`Visual Studio Generators` set this variable to the ``MSBuild.exe``
+command installed with the corresponding Visual Studio version.
 
 This variable is not defined by other generators even if ``MSBuild.exe``
 is installed on the computer.
 
-The :variable:`CMAKE_VS_DEVENV_COMMAND` is also provided for the
-non-Express editions of Visual Studio.
-See also the :variable:`CMAKE_MAKE_PROGRAM` variable.
+See also the :variable:`CMAKE_VS_DEVENV_COMMAND` and
+:variable:`CMAKE_MAKE_PROGRAM` variables.
diff --git a/Modules/CMakeDetermineCSharpCompiler.cmake b/Modules/CMakeDetermineCSharpCompiler.cmake
index 652eb63..6506894 100644
--- a/Modules/CMakeDetermineCSharpCompiler.cmake
+++ b/Modules/CMakeDetermineCSharpCompiler.cmake
@@ -1,9 +1,9 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-if(NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])")
+if(NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio")
   message(FATAL_ERROR
-    "C# is currently only supported for Microsoft Visual Studio 12 2013 and later.")
+    "C# is currently only supported by Visual Studio generators.")
 endif()
 
 include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index c58511a..bc4de91 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -188,9 +188,8 @@
   itself. This property is only meaningful for
   :ref:`Makefile <Makefile Generators>`,
   :ref:`Ninja <Ninja Generators>`, :generator:`Xcode`, and
-  :ref:`Visual Studio <Visual Studio Generators>`
-  (:generator:`Visual Studio 12 2013` and above) generators. Default value is
-  ``FALSE``.
+  :ref:`Visual Studio <Visual Studio Generators>` generators.
+  Default value is ``FALSE``.
 
   .. versionadded:: 3.21
     Added the support of :generator:`Xcode` generator.
@@ -352,9 +351,8 @@
   itself. This variable is only meaningful for
   :ref:`Makefile <Makefile Generators>`,
   :ref:`Ninja <Ninja Generators>`, :generator:`Xcode`, and
-  :ref:`Visual Studio <Visual Studio Generators>`
-  (:generator:`Visual Studio 12 2013` and above) generators. Default value is
-  ``FALSE``.
+  :ref:`Visual Studio <Visual Studio Generators>` generators.
+  Default value is ``FALSE``.
 
   Source file property ``USE_SWIG_DEPENDENCIES``, if not defined, will be
   initialized with the value of this variable.
@@ -565,7 +563,7 @@
   endif()
 
   set (use_swig_dependencies ${SWIG_USE_SWIG_DEPENDENCIES})
-  if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio (1[1-9]|[2-9][0-9])")
+  if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio")
     get_property(use_swig_dependencies_set SOURCE "${infile}" PROPERTY USE_SWIG_DEPENDENCIES SET)
     if (use_swig_dependencies_set)
       get_property(use_swig_dependencies SOURCE "${infile}" PROPERTY USE_SWIG_DEPENDENCIES)
@@ -890,7 +888,7 @@
     set(SWIG_SOURCE_FILE_EXTENSIONS ".i")
   endif()
 
-  if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio (1[1-9]|[2-9][0-9])")
+  if (CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio")
     # For Makefiles, Ninja, Xcode and Visual Studio generators,
     # use SWIG generated dependencies if requested
     if (NOT DEFINED SWIG_USE_SWIG_DEPENDENCIES)
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 51d6d8a..f9abe29 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -516,13 +516,6 @@
 
   this->DefaultPlatformToolset = this->SelectWindowsCEToolset();
 
-  if (this->Version == cmGlobalVisualStudioGenerator::VSVersion::VS12) {
-    // VS 12 .NET CF defaults to .NET framework 3.9 for Windows CE.
-    this->DefaultTargetFrameworkVersion = "v3.9";
-    this->DefaultTargetFrameworkIdentifier = "WindowsEmbeddedCompact";
-    this->DefaultTargetFrameworkTargetsVersion = "v8.0";
-  }
-
   return true;
 }
 
@@ -1273,8 +1266,6 @@
 const char* cmGlobalVisualStudio10Generator::GetToolsVersion() const
 {
   switch (this->Version) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return "12.0";
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return "14.0";
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index 1f1a2c3..e5406dd 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -9,131 +9,17 @@
 #include <cmext/string_view>
 
 #include "cmGlobalGenerator.h"
-#include "cmGlobalGeneratorFactory.h"
 #include "cmGlobalVisualStudioGenerator.h"
 #include "cmMakefile.h"
 #include "cmMessageType.h"
 #include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 
-static const char vs12generatorName[] = "Visual Studio 12 2013";
-
-// Map generator name without year to name with year.
-static const char* cmVS12GenName(const std::string& name, std::string& genName)
-{
-  if (strncmp(name.c_str(), vs12generatorName,
-              sizeof(vs12generatorName) - 6) != 0) {
-    return nullptr;
-  }
-  const char* p = name.c_str() + sizeof(vs12generatorName) - 6;
-  if (cmHasLiteralPrefix(p, " 2013")) {
-    p += 5;
-  }
-  genName = std::string(vs12generatorName) + p;
-  return p;
-}
-
-class cmGlobalVisualStudio12Generator::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 = cmVS12GenName(name, genName);
-    if (!p) {
-      return std::unique_ptr<cmGlobalGenerator>();
-    }
-    if (!*p) {
-      return std::unique_ptr<cmGlobalGenerator>(
-        new cmGlobalVisualStudio12Generator(cm, genName, ""));
-    }
-    if (!allowArch || *p++ != ' ') {
-      return std::unique_ptr<cmGlobalGenerator>();
-    }
-    if (strcmp(p, "Win64") == 0) {
-      return std::unique_ptr<cmGlobalGenerator>(
-        new cmGlobalVisualStudio12Generator(cm, genName, "x64"));
-    }
-    if (strcmp(p, "ARM") == 0) {
-      return std::unique_ptr<cmGlobalGenerator>(
-        new cmGlobalVisualStudio12Generator(cm, genName, "ARM"));
-    }
-    return std::unique_ptr<cmGlobalGenerator>();
-  }
-
-  cmDocumentationEntry GetDocumentation() const override
-  {
-    return { cmStrCat(vs12generatorName, " [arch]"),
-             "Deprecated.  Generates Visual Studio 2013 project files.  "
-             "Optional [arch] can be \"Win64\" or \"ARM\"." };
-  }
-
-  std::vector<std::string> GetGeneratorNames() const override
-  {
-    std::vector<std::string> names;
-    names.push_back(vs12generatorName);
-    return names;
-  }
-
-  std::vector<std::string> GetGeneratorNamesWithPlatform() const override
-  {
-    std::vector<std::string> names;
-    names.emplace_back(cmStrCat(vs12generatorName, " ARM"));
-    names.emplace_back(cmStrCat(vs12generatorName, " 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("ARM");
-    return platforms;
-  }
-
-  std::string GetDefaultPlatformName() const override { return "Win32"; }
-};
-
-std::unique_ptr<cmGlobalGeneratorFactory>
-cmGlobalVisualStudio12Generator::NewFactory()
-{
-  return std::unique_ptr<cmGlobalGeneratorFactory>(new Factory);
-}
-
 cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator(
   cmake* cm, const std::string& name,
   std::string const& platformInGeneratorName)
   : cmGlobalVisualStudio11Generator(cm, name, platformInGeneratorName)
 {
-  std::string vc12Express;
-  this->ExpressEdition = cmSystemTools::ReadRegistryValue(
-    "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\12.0\\Setup\\VC;"
-    "ProductDir",
-    vc12Express, cmSystemTools::KeyWOW64_32);
-  this->DefaultPlatformToolset = "v120";
-  this->DefaultCLFlagTableName = "v12";
-  this->DefaultCSharpFlagTableName = "v12";
-  this->DefaultLibFlagTableName = "v12";
-  this->DefaultLinkFlagTableName = "v12";
-  this->DefaultMasmFlagTableName = "v12";
-  this->DefaultRCFlagTableName = "v12";
-  this->Version = VSVersion::VS12;
-}
-
-bool cmGlobalVisualStudio12Generator::MatchesGeneratorName(
-  const std::string& name) const
-{
-  std::string genName;
-  if (cmVS12GenName(name, genName)) {
-    return genName == this->GetName();
-  }
-  return false;
 }
 
 bool cmGlobalVisualStudio12Generator::ProcessGeneratorToolsetField(
diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h
index a84756e..edb86e2 100644
--- a/Source/cmGlobalVisualStudio12Generator.h
+++ b/Source/cmGlobalVisualStudio12Generator.h
@@ -9,18 +9,12 @@
 
 #include "cmGlobalVisualStudio11Generator.h"
 
-class cmGlobalGeneratorFactory;
 class cmMakefile;
 class cmake;
 
 /** \class cmGlobalVisualStudio12Generator  */
 class cmGlobalVisualStudio12Generator : public cmGlobalVisualStudio11Generator
 {
-public:
-  static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory();
-
-  bool MatchesGeneratorName(const std::string& name) const override;
-
 protected:
   cmGlobalVisualStudio12Generator(cmake* cm, const std::string& name,
                                   std::string const& platformInGeneratorName);
@@ -41,8 +35,4 @@
   // of the toolset is installed
   bool IsWindowsPhoneToolsetInstalled() const;
   bool IsWindowsStoreToolsetInstalled() const;
-
-private:
-  class Factory;
-  friend class Factory;
 };
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 7e04b9f..8c644ab 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -309,26 +309,6 @@
     this->CallVisualStudioMacro(MacroReload,
                                 GetSLNFile(this->LocalGenerators[0].get()));
   }
-
-  if (this->Version == VSVersion::VS12 &&
-      !this->CMakeInstance->GetIsInTryCompile()) {
-    std::string cmakeWarnVS12;
-    if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue(
-          "CMAKE_WARN_VS12")) {
-      this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS12");
-      cmakeWarnVS12 = *cached;
-    } else {
-      cmSystemTools::GetEnv("CMAKE_WARN_VS12", cmakeWarnVS12);
-    }
-    if (cmakeWarnVS12.empty() || !cmIsOff(cmakeWarnVS12)) {
-      this->CMakeInstance->IssueMessage(
-        MessageType::WARNING,
-        "The \"Visual Studio 12 2013\" generator is deprecated "
-        "and will be removed in a future version of CMake."
-        "\n"
-        "Add CMAKE_WARN_VS12=OFF to the cache to disable this warning.");
-    }
-  }
 }
 
 void cmGlobalVisualStudio7Generator::OutputSLNFile(
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index f96a84c..5ff9506 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -104,8 +104,6 @@
 const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const
 {
   switch (this->Version) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return "12.0";
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return "14.0";
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@@ -125,14 +123,6 @@
   fout << '\n';
 
   switch (this->Version) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
-      if (this->ExpressEdition) {
-        fout << "# Visual Studio Express 2013 for Windows Desktop\n";
-      } else {
-        fout << "# Visual Studio 2013\n";
-      }
-      break;
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       // Visual Studio 14 writes .sln format 12.00
       fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index f052413..a53b3bd 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -34,8 +34,6 @@
   /** Known versions of Visual Studio.  */
   enum class VSVersion : uint16_t
   {
-    VS12 = 120,
-    /* VS13 = 130 was skipped */
     VS14 = 140,
     VS15 = 150,
     VS16 = 160,
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 0eb05d4..14460fd 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -125,8 +125,6 @@
   cmGlobalVisualStudioGenerator::VSVersion v)
 {
   switch (v) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return 12;
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return 14;
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@@ -143,8 +141,6 @@
   cmGlobalVisualStudioGenerator::VSVersion v)
 {
   switch (v) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return "v120";
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return "v140";
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@@ -161,8 +157,6 @@
   cmGlobalVisualStudioGenerator::VSVersion v)
 {
   switch (v) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return "12";
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return "14";
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@@ -179,8 +173,6 @@
   cmGlobalVisualStudioGenerator::VSVersion v)
 {
   switch (v) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return "";
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return "Clang_3_8";
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@@ -478,7 +470,6 @@
 {
   std::string genName;
   switch (this->Version) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       break;
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@@ -744,8 +735,6 @@
   const
 {
   switch (this->Version) {
-    case cmGlobalVisualStudioGenerator::VSVersion::VS12:
-      return "";
     case cmGlobalVisualStudioGenerator::VSVersion::VS14:
       return "2.0";
     case cmGlobalVisualStudioGenerator::VSVersion::VS15:
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9c20ac7..1753e20 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -477,11 +477,6 @@
     Elem e0(BuildFileStream, "Project");
     e0.Attribute("DefaultTargets", "Build");
     const char* toolsVersion = this->GlobalGenerator->GetToolsVersion();
-    if (this->GlobalGenerator->GetVersion() ==
-          cmGlobalVisualStudioGenerator::VSVersion::VS12 &&
-        this->GlobalGenerator->TargetsWindowsCE()) {
-      toolsVersion = "4.0";
-    }
     e0.Attribute("ToolsVersion", toolsVersion);
     e0.Attribute("xmlns",
                  "http://schemas.microsoft.com/developer/msbuild/2003");
@@ -644,11 +639,8 @@
 
       // Disable the project upgrade prompt that is displayed the first time a
       // project using an older toolset version is opened in a newer version of
-      // the IDE (respected by VS 2013 and above).
-      if (this->GlobalGenerator->GetVersion() >=
-          cmGlobalVisualStudioGenerator::VSVersion::VS12) {
-        e1.Element("VCProjectUpgraderObjectName", "NoUpgrade");
-      }
+      // the IDE.
+      e1.Element("VCProjectUpgraderObjectName", "NoUpgrade");
 
       if (const char* vcTargetsPath =
             this->GlobalGenerator->GetCustomVCTargetsPath()) {
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 02b3d87..fcee5e5 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -97,7 +97,6 @@
 #    include "cmGlobalBorlandMakefileGenerator.h"
 #    include "cmGlobalJOMMakefileGenerator.h"
 #    include "cmGlobalNMakeMakefileGenerator.h"
-#    include "cmGlobalVisualStudio12Generator.h"
 #    include "cmGlobalVisualStudio14Generator.h"
 #    include "cmGlobalVisualStudioVersionedGenerator.h"
 #    include "cmVSSetupHelper.h"
@@ -2654,7 +2653,6 @@
   };
   static VSVersionedGenerator const vsGenerators[] = {
     { "14.0", "Visual Studio 14 2015" }, //
-    { "12.0", "Visual Studio 12 2013" }, //
   };
   static const char* const vsEntries[] = {
     "\\Setup\\VC;ProductDir", //
@@ -3049,7 +3047,6 @@
   this->Generators.push_back(
     cmGlobalVisualStudioVersionedGenerator::NewFactory15());
   this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory());
-  this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory());
   this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory());
   this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory());
   this->Generators.push_back(cmGlobalJOMMakefileGenerator::NewFactory());
@@ -3809,7 +3806,7 @@
   // 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/" +
-    cmGlobalVisualStudio12Generator::GetGenerateStampList();
+    cmGlobalVisualStudio14Generator::GetGenerateStampList();
 
   // Note that the stampList file only exists for VS generators.
   if (cmSystemTools::FileExists(stampList)) {
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index a3a7589..771f5db 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -50,13 +50,6 @@
 ")
 endif()
 
-# Suppress generator deprecation warnings in test suite.
-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 "")
-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
@@ -185,39 +178,11 @@
   endif()
 
   if(WIN32)
-    # Macro to search for available Windows CE SDKs in the windows Registry
-    macro(select_wince_sdk selected_reg selected_sdk)
-      if(CMAKE_HOST_WIN32)
-        execute_process(COMMAND reg QUERY "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows CE Tools\\SDKs"
-                    OUTPUT_VARIABLE sdk_reg
-                    ERROR_VARIABLE my_err)
-        string(REGEX REPLACE "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows CE Tools\\\\SDKs\\\\"  ";" sdk_list "${sdk_reg}")
-        list(LENGTH sdk_list sdk_list_len)
-        if(${sdk_list_len} GREATER 1)
-          list(GET sdk_list 1 _sdk) # The first entry is always empty due to the regex replace above
-          string(STRIP ${_sdk} _sdk) # Make sure there is no newline in the SDK name
-        endif()
-        # Build a key to be used by get_filename_component that is pointing to the SDK directory
-        set(_reg "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows CE Tools\\SDKs\\${_sdk}]")
-        # Set return values
-        set(${selected_reg} ${_reg})
-        set(${selected_sdk} ${_sdk})
-      endif(CMAKE_HOST_WIN32)
-    endmacro(select_wince_sdk)
-
-    set(reg_vs10 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]")
-    set(reg_vs11 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;InstallDir]")
-    set(reg_vs12 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;InstallDir]")
     set(reg_vs14 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0;InstallDir]")
-    set(reg_ws80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]")
-    set(reg_ws81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]")
     set(reg_ws10_0 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\Build Tools for Windows 10;srcPath]")
-    set(reg_wp80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]")
-    set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]")
-    select_wince_sdk(reg_wince wince_sdk)
     set(reg_tegra "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Nsight Tegra;sdkRoot]")
     set(reg_nasm "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]")
-    foreach(reg IN ITEMS vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra nasm)
+    foreach(reg IN ITEMS vs14 ws10_0 tegra nasm)
       get_filename_component(r "${reg_${reg}}" ABSOLUTE)
       if(IS_DIRECTORY "${r}" AND NOT "${r}" STREQUAL "/registry")
         set(${reg} 1)
@@ -2225,7 +2190,7 @@
     ADD_TEST_MACRO(VSMASM VSMASM)
   endif()
 
-  if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+  if(CMAKE_GENERATOR MATCHES "Visual Studio")
     if(NOT MSVC60)
       ADD_TEST_MACRO(SBCS SBCS)
     endif()
@@ -2287,20 +2252,17 @@
       list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild")
     endif()
 
-    if(CMAKE_GENERATOR MATCHES "Visual Studio ([0-5]|[6-9][0-9])")
-      # This is Visual Studio 10 or above, so the default build tool is MSBuild.
-      add_test(NAME VSProjectInSubdir COMMAND ${CMAKE_CTEST_COMMAND}
-        --build-and-test
-        "${CMake_SOURCE_DIR}/Tests/VSProjectInSubdir"
-        "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir"
-        --build-two-config
-        --build-generator ${CMAKE_GENERATOR}
-        --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
-        --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
-        --build-project VSProjectInSubdir
-        --build-target test)
-      list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir")
-    endif()
+    add_test(NAME VSProjectInSubdir COMMAND ${CMAKE_CTEST_COMMAND}
+      --build-and-test
+      "${CMake_SOURCE_DIR}/Tests/VSProjectInSubdir"
+      "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir"
+      --build-two-config
+      --build-generator ${CMAKE_GENERATOR}
+      --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
+      --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
+      --build-project VSProjectInSubdir
+      --build-target test)
+    list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir")
   endif()
 
   get_filename_component(ntver "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion;CurrentVersion]" NAME)
@@ -2323,22 +2285,21 @@
       list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSWinStorePhone/${name}")
     endmacro()
 
-    if(vs12 AND ws81)
-      add_test_VSWinStorePhone(vs12-store81-X86 "Visual Studio 12 2013" WindowsStore 8.1 Win32)
-      add_test_VSWinStorePhone(vs12-store81-ARM "Visual Studio 12 2013" WindowsStore 8.1 ARM)
-      add_test_VSWinStorePhone(vs12-store81-X64 "Visual Studio 12 2013" WindowsStore 8.1 x64)
-
+    # FIXME(#26248): Update this test to work with newer VS and Win 10.0.
+    # It previously ran with Visual Studio 12 2013 targeting Win 8.1.
+    if(FALSE AND CMAKE_GENERATOR MATCHES "Visual Studio")
       add_test(NAME VSXaml COMMAND ${CMAKE_CTEST_COMMAND}
         --build-and-test
           "${CMake_SOURCE_DIR}/Tests/VSXaml"
           "${CMake_BINARY_DIR}/Tests/VSXaml"
-          --build-generator "Visual Studio 12 2013"
+          --build-generator "${CMAKE_GENERATOR}"
           --build-project VSXaml
           --build-config $<CONFIGURATION>
           --build-options -DCMAKE_SYSTEM_NAME=WindowsStore
-                          -DCMAKE_SYSTEM_VERSION=8.1
+                          -DCMAKE_SYSTEM_VERSION=10.0
         )
     endif()
+
     if(CMake_TEST_VSWinStorePhone_VS_2017 AND ws10_0)
       add_test_VSWinStorePhone(vs15-store10_0-X86 "Visual Studio 15 2017" WindowsStore 10.0 Win32)
       add_test_VSWinStorePhone(vs15-store10_0-ARM "Visual Studio 15 2017" WindowsStore 10.0 ARM)
@@ -2350,35 +2311,6 @@
       add_test_VSWinStorePhone(vs14-store10_0-ARM "Visual Studio 14 2015" WindowsStore 10.0 ARM)
       add_test_VSWinStorePhone(vs14-store10_0-X64 "Visual Studio 14 2015" WindowsStore 10.0 x64)
     endif()
-    if(vs12 AND wp81)
-      add_test_VSWinStorePhone(vs12-phone81-X86 "Visual Studio 12 2013" WindowsPhone 8.1 Win32)
-      add_test_VSWinStorePhone(vs12-phone81-ARM "Visual Studio 12 2013" WindowsPhone 8.1 ARM)
-    endif()
-  endif()
-
-  if(WIN32 AND wince)
-    macro(add_test_VSWinCE name generator systemName systemVersion generatorPlatform)
-      # TODO: Fix the tutorial to make it work in cross compile
-      # currently the MakeTable is build for target and can not be used on the host
-      # This happens in part 5 so we build only through part 4 of the tutorial.
-      foreach(STP RANGE 2 4)
-        add_test(NAME "TutorialStep${STP}.${name}" COMMAND ${CMAKE_CTEST_COMMAND}
-          --build-and-test
-          "${CMake_SOURCE_DIR}/Help/guide/tutorial/Step${STP}"
-          "${CMake_BINARY_DIR}/Tests/Tutorial/Step${STP}_${name}"
-          --build-generator "${generator}"
-          --build-project Tutorial
-          --build-config $<CONFIGURATION>
-          --build-options -DCMAKE_SYSTEM_NAME=${systemName}
-                          -DCMAKE_SYSTEM_VERSION=${systemVersion}
-                          -DCMAKE_GENERATOR_PLATFORM=${generatorPlatform})
-        list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial/Step${STP}_${name}")
-      endforeach()
-    endmacro()
-
-    if(vs12)
-      add_test_VSWinCE(vs12-ce80-ARM "Visual Studio 12 2013" WindowsCE 8.0 ${wince_sdk})
-    endif()
   endif()
 
   if(CMAKE_GENERATOR MATCHES "Visual Studio" AND nasm)
@@ -2502,9 +2434,6 @@
     list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSAndroid/${name}")
   endmacro()
   if(tegra AND NOT "${CMake_SOURCE_DIR};${CMake_BINARY_DIR}" MATCHES " ")
-    if(vs12)
-      add_test_VSAndroid(vs12 "Visual Studio 12 2013" "Tegra-Android")
-    endif()
     if(vs14)
       add_test_VSAndroid(vs14 "Visual Studio 14 2015" "Tegra-Android")
     endif()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 65295cc..32996b8 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -778,9 +778,6 @@
     -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION}
     )
   add_RunCMake_test(VS10ProjectUseDebugLibraries)
-  if( vs12 AND wince )
-    add_RunCMake_test( VS10ProjectWinCE "-DRunCMake_GENERATOR_PLATFORM=${wince_sdk}")
-  endif()
 endif()
 
 if(CMAKE_GENERATOR MATCHES "^Visual Studio (1[6-9]|[2-9][0-9])"
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake
+++ /dev/null
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt
deleted file mode 100644
index b69408e..0000000
--- a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-^CMake Warning:
-  The "Visual Studio 12 2013" generator is deprecated and will be removed in
-  a future version of CMake.
-
-  Add CMAKE_WARN_VS12=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake
deleted file mode 100644
index e69de29..0000000
--- a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake
+++ /dev/null
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 8e5bffe..dca4a98 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -382,21 +382,18 @@
   run_cmake_command(Envgen-bad-help ${CMAKE_COMMAND} --help)
   unset(ENV{CMAKE_GENERATOR})
 
-  if(RunCMake_GENERATOR MATCHES "Visual Studio.*")
+  if(RunCMake_GENERATOR MATCHES "Visual Studio")
     set(ENV{CMAKE_GENERATOR} "${RunCMake_GENERATOR}")
     run_cmake_command(Envgen ${CMAKE_COMMAND} ${source_dir})
-    # Toolset is available since VS 2010.
-    if(RunCMake_GENERATOR MATCHES "Visual Studio [1-9][0-9]")
-      set(ENV{CMAKE_GENERATOR_TOOLSET} "invalid")
-      # Envvar shouldn't affect existing build tree
-      run_cmake_command(Envgen-toolset-existing ${CMAKE_COMMAND} -E chdir ..
-        ${CMAKE_COMMAND} --build Envgen-build)
-      run_cmake_command(Envgen-toolset-invalid ${CMAKE_COMMAND} ${source_dir})
-      # Command line -G implies -T""
-      run_cmake_command(Envgen-G-implicit-toolset ${CMAKE_COMMAND} -G "${RunCMake_GENERATOR}" ${source_dir})
-      run_cmake_command(Envgen-T-toolset ${CMAKE_COMMAND} -T "fromcli" ${source_dir})
-      unset(ENV{CMAKE_GENERATOR_TOOLSET})
-    endif()
+    set(ENV{CMAKE_GENERATOR_TOOLSET} "invalid")
+    # Envvar shouldn't affect existing build tree
+    run_cmake_command(Envgen-toolset-existing ${CMAKE_COMMAND} -E chdir ..
+      ${CMAKE_COMMAND} --build Envgen-build)
+    run_cmake_command(Envgen-toolset-invalid ${CMAKE_COMMAND} ${source_dir})
+    # Command line -G implies -T""
+    run_cmake_command(Envgen-G-implicit-toolset ${CMAKE_COMMAND} -G "${RunCMake_GENERATOR}" ${source_dir})
+    run_cmake_command(Envgen-T-toolset ${CMAKE_COMMAND} -T "fromcli" ${source_dir})
+    unset(ENV{CMAKE_GENERATOR_TOOLSET})
     # Platform can be set only if not in generator name.
     if(RunCMake_GENERATOR MATCHES "^Visual Studio [0-9]+ [0-9]+$")
       set(ENV{CMAKE_GENERATOR_PLATFORM} "invalid")
@@ -1130,13 +1127,6 @@
 run_cmake(ProfilingTest)
 unset(RunCMake_TEST_OPTIONS)
 
-if(RunCMake_GENERATOR MATCHES "^Visual Studio 12 2013")
-  run_cmake_with_options(DeprecateVS12-WARN-ON -DCMAKE_WARN_VS12=ON)
-  unset(ENV{CMAKE_WARN_VS12})
-  run_cmake(DeprecateVS12-WARN-ON)
-  run_cmake_with_options(DeprecateVS12-WARN-OFF -DCMAKE_WARN_VS12=OFF)
-endif()
-
 run_cmake_with_options(help-arbitrary "--help" "CMAKE_CXX_IGNORE_EXTENSIONS")
 
 if (WIN32 OR DEFINED ENV{HOME})
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index b86c481..80d1d5e 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -1,6 +1,6 @@
 include(RunCMake)
 
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124567]")
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio")
   run_cmake(VsNormal)
   include("${RunCMake_BINARY_DIR}/VsNormal-build/defaults.cmake" OPTIONAL)
   message(STATUS "VsNormal: platform='${VsNormal_Platform}' toolset='${VsNormal_Toolset}'")
@@ -9,7 +9,7 @@
 set(RunCMake_GENERATOR_TOOLSET "")
 run_cmake(NoToolset)
 
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124567]")
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio")
   set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
   run_cmake(TestToolset)
   set(RunCMake_GENERATOR_TOOLSET "Test Toolset,cuda=0.0")
@@ -49,7 +49,7 @@
   run_cmake(TestToolsetFortranIFX)
   set(RunCMake_GENERATOR_TOOLSET "fortran=bad")
   run_cmake(BadToolsetFortran)
-  if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[24567]")
+  if("${RunCMake_GENERATOR}" MATCHES "Visual Studio")
     set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
     run_cmake(TestToolsetHostArchBoth)
     set(RunCMake_GENERATOR_TOOLSET ",host=x64")
@@ -119,7 +119,7 @@
 run_cmake(TwoToolsets)
 unset(RunCMake_TEST_OPTIONS)
 
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124567]|Xcode")
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio|Xcode")
   set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake)
   run_cmake(TestToolsetToolchain)
   unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt b/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt
deleted file mode 100644
index 91baae7..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 3.5.0)
-project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake b/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake
deleted file mode 100644
index 2c9067f..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-include(RunCMake)
-
-set(RunCMake_GENERATOR "Visual Studio 12 2013")
-set(RunCMake_GENERATOR_TOOLSET CE800)
-set(RunCMake_GENERATOR_INSTANCE "")
-set(RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=WindowsCE  )
-
-run_cmake(VsCEDebuggerDeploy)
-run_cmake(VSCSharpCFProject)
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake
deleted file mode 100644
index b1deb99..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake
+++ /dev/null
@@ -1,118 +0,0 @@
-set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
-if(NOT EXISTS "${vcProjectFile}")
-  set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
-  return()
-endif()
-
-
-if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" )
-  set(RunCMake_TEST_FAILED "Test only valid for WindowsCE")
-  return()
-endif()
-
-
-set(FoundCEAdditionalFiles FALSE)
-set(FoundRemoteDirectory FALSE)
-set(FoundToolsVersion4 FALSE)
-set(FoundEnableRedirectPlatform FALSE)
-set(FoundRedirectPlatformValue FALSE)
-
-
-file(STRINGS "${vcProjectFile}" lines)
-foreach(line IN LISTS lines)
-  if(line MATCHES "^ *<CEAdditionalFiles> *foo\\.dll\\|\\\\foo\\\\src\\\\dir\\\\on\\\\host\\|\\$\\(RemoteDirectory\\)\\|0;bar\\.dll\\|\\\\bar\\\\src\\\\dir\\|\\$\\(RemoteDirectory\\)bardir\\|0.*</CEAdditionalFiles> *$")
-    set(FoundCEAdditionalFiles TRUE)
-  elseif(line MATCHES " *<RemoteDirectory>[A-Za-z0-9\\]+</RemoteDirectory> *$")
-    set(FoundRemoteDirectory TRUE)
-  elseif(line MATCHES " *<Project +.*ToolsVersion=\"4.0\".*> *$")
-    set(FoundToolsVersion4 TRUE)
-  elseif(line MATCHES "^ *<EnableRedirectPlatform>true</EnableRedirectPlatform> *$")
-    set(FoundEnableRedirectPlatform TRUE)
-  elseif(line MATCHES "^ *<RedirectPlatformValue>.+</RedirectPlatformValue> *$")
-    set(FoundRedirectPlatformValue TRUE)
-  endif()
-endforeach()
-
-if(NOT FoundCEAdditionalFiles)
-  set(RunCMake_TEST_FAILED "CEAddionalFiles not found or not set correctly.")
-  return()
-endif()
-
-if(NOT FoundRemoteDirectory)
-  set(RunCMake_TEST_FAILED "RemoteDirectory not found or not set correctly.")
-  return()
-endif()
-
-if(NOT FoundToolsVersion4)
-  set(RunCMake_TEST_FAILED "Failed to find correct ToolsVersion=\"4.0\" .")
-  return()
-endif()
-
-if(NOT FoundEnableRedirectPlatform)
-  set(RunCMake_TEST_FAILED "Failed to find EnableRedirectPlatform true property.")
-  return()
-endif()
-
-if(NOT FoundRedirectPlatformValue)
-  set(RunCMake_TEST_FAILED "Failed to find RedirectPlatformValue property.")
-  return()
-endif()
-
-#
-# Test solution file deployment items.
-#
-
-set(vcSlnFile "${RunCMake_TEST_BINARY_DIR}/VsCEDebuggerDeploy.sln")
-if(NOT EXISTS "${vcSlnFile}")
-  set(RunCMake_TEST_FAILED "Solution file ${vcSlnFile} does not exist.")
-  return()
-endif()
-
-
-if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" )
-  set(RunCMake_TEST_FAILED "Test only valid for WindowsCE")
-  return()
-endif()
-
-
-set(FooProjGUID "")
-set(FoundFooProj FALSE)
-set(InFooProj FALSE)
-set(FoundReleaseDeploy FALSE)
-set(DeployConfigs Debug MinSizeRel RelWithDebInfo )
-
-file(STRINGS "${vcSlnFile}" lines)
-foreach(line IN LISTS lines)
-#message(STATUS "${line}")
-  if( (NOT InFooProj ) AND (line MATCHES "^[ \\t]*Project\\(\"{[A-F0-9-]+}\"\\) = \"foo\", \"foo.vcxproj\", \"({[A-F0-9-]+})\"[ \\t]*$"))
-    # First, identify the GUID for the foo project, and record it.
-    set(FoundFooProj TRUE)
-    set(InFooProj TRUE)
-    set(FooProjGUID ${CMAKE_MATCH_1})
-  elseif(InFooProj AND line MATCHES "EndProject")
-    set(InFooProj FALSE)
-  elseif((NOT InFooProj) AND line MATCHES "${FooProjGUID}\\.Release.*\\.Deploy\\.0")
-    # If foo's Release configuration is set to deploy, this is the error.
-    set(FoundReleaseDeploy TRUE)
-  endif()
-  if( line MATCHES "{[A-F0-9-]+}\\.([^\\|]+).*\\.Deploy\\.0" )
-    # Check that the other configurations ARE set to deploy.
-    list( REMOVE_ITEM DeployConfigs ${CMAKE_MATCH_1})
-  endif()
-endforeach()
-
-if(FoundReleaseDeploy)
-  set(RunCMake_TEST_FAILED "Release deployment not inhibited by VS_NO_SOLUTION_DEPLOY_Release.")
-  return()
-endif()
-
-if(NOT FoundFooProj)
-  set(RunCMake_TEST_FAILED "Failed to find foo project in the solution.")
-  return()
-endif()
-
-list(LENGTH DeployConfigs length)
-if(  length GREATER 0 )
-  set(RunCMake_TEST_FAILED "Failed to find Deploy lines for non-Release configurations. (${length})")
-  return()
-endif()
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake
deleted file mode 100644
index 611db0a..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-enable_language(CXX)
-
-set(DEPLOY_DIR
-   "temp\\foodir"
-)
-
-add_library(foo SHARED foo.cpp)
-
-set_target_properties(foo
- PROPERTIES
-  DEPLOYMENT_ADDITIONAL_FILES "foo.dll|\\foo\\src\\dir\\on\\host|$(RemoteDirectory)|0;bar.dll|\\bar\\src\\dir|$(RemoteDirectory)bardir|0"
-  DEPLOYMENT_REMOTE_DIRECTORY ${DEPLOY_DIR}
-  VS_NO_SOLUTION_DEPLOY $<CONFIG:Release>
-)
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake
deleted file mode 100644
index 618896e..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Check C# Compact Framework project for required elements.
-#
-set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj")
-if(NOT EXISTS "${csProjectFile}")
-  set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.")
-  return()
-endif()
-
-if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" )
-  set(RunCMake_TEST_FAILED "Test only valid for WindowsCE")
-  return()
-endif()
-
-set(FoundTargetFrameworkTargetsVersion FALSE)
-set(FoundDotNetFrameworkVersion FALSE)
-set(FoundTargetFrameworkIdentifier FALSE)
-set(FoundCFTargetsImport FALSE)
-
-
-file(STRINGS "${csProjectFile}" lines)
-foreach(line IN LISTS lines)
-  #message(STATUS ${line})
-  if(line MATCHES "^ *<TargetFrameworkIdentifier>WindowsEmbeddedCompact</TargetFrameworkIdentifier> *$")
-    set(FoundTargetFrameworkIdentifier TRUE)
-  elseif(line MATCHES " *<TargetFrameworkVersion>v3.9</TargetFrameworkVersion> *$")
-    set(FoundDotNetFrameworkVersion TRUE)
-  elseif(line MATCHES " *<TargetFrameworkTargetsVersion>v8.0</TargetFrameworkTargetsVersion> *$")
-    set(FoundTargetFrameworkTargetsVersion TRUE)
-  elseif( line MATCHES " *<Import Project=\"\\$\\(MSBuildExtensionsPath\\)\\\\Microsoft\\\\\\$\\(TargetFrameworkIdentifier\\)\\\\\\$\\(TargetFrameworkTargetsVersion\\)\\\\Microsoft\\.\\$\\(TargetFrameworkIdentifier\\)\\.CSharp\\.targets\" */> *" )
-    set(FoundCFTargetsImport TRUE)
-  endif()
-endforeach()
-
-
-if(NOT FoundTargetFrameworkTargetsVersion)
-  set(RunCMake_TEST_FAILED "TargetFrameworkIdentifier not found or not set correctly.")
-  return()
-endif()
-
-if(NOT FoundDotNetFrameworkVersion)
-  set(RunCMake_TEST_FAILED "TargetFrameworkVersion not found or not set correctly.")
-  return()
-endif()
-
-if(NOT FoundTargetFrameworkIdentifier)
-  set(RunCMake_TEST_FAILED "TargetFrameworkTargetsVersion not found or not set correctly.")
-  return()
-endif()
-
-if(NOT FoundCFTargetsImport)
-  set(RunCMake_TEST_FAILED "Import of Compact Framework targets file not found or not set correctly.")
-  return()
-endif()
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake
deleted file mode 100644
index fb2acbb..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-enable_language(CSharp)
-
-add_library(foo SHARED foo.cs )
-
-set_target_properties(foo
- PROPERTIES
-   DOTNET_TARGET_FRAMEWORK_VERSION "v3.9"
-)
diff --git a/Tests/RunCMake/VS10ProjectWinCE/foo.cpp b/Tests/RunCMake/VS10ProjectWinCE/foo.cpp
deleted file mode 100644
index 3695dc9..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/foo.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-void foo()
-{
-}
diff --git a/Tests/RunCMake/VS10ProjectWinCE/foo.cs b/Tests/RunCMake/VS10ProjectWinCE/foo.cs
deleted file mode 100644
index 3695dc9..0000000
--- a/Tests/RunCMake/VS10ProjectWinCE/foo.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-void foo()
-{
-}
diff --git a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
index 801abae..f29697c 100644
--- a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
@@ -53,7 +53,7 @@
   set(RunCMake-check-file ExcludeFromAll/check-sub.cmake)
   set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY ${RunCMake_BINARY_DIR}/ExcludeFromAll-build/ExcludeFromAll)
   run_cmake_command(ExcludeFromAll-build-sub "${RunCMake_MAKE_PROGRAM}")
-elseif(RunCMake_GENERATOR MATCHES "^Visual Studio [1-9][0-9]")
+elseif(RunCMake_GENERATOR MATCHES "Visual Studio")
   set(RunCMake-check-file ExcludeFromAll/check-sub.cmake)
   run_cmake_command(ExcludeFromAll-build-sub ${CMAKE_COMMAND} --build ExcludeFromAll --config Debug)
 elseif(RunCMake_GENERATOR STREQUAL "Xcode")
diff --git a/Tests/UseSWIG/CMakeLists.txt b/Tests/UseSWIG/CMakeLists.txt
index 0971025..d36c3ff 100644
--- a/Tests/UseSWIG/CMakeLists.txt
+++ b/Tests/UseSWIG/CMakeLists.txt
@@ -87,7 +87,7 @@
   --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
   )
 if(SWIG_FOUND AND NOT SWIG_VERSION VERSION_LESS "4.0.2"
-    AND CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio (1[1-9]|[2-9][0-9])")
+    AND CMAKE_GENERATOR MATCHES "Make|Ninja|Xcode|Visual Studio")
   add_test(NAME UseSWIG.Depfile.BasicPython COMMAND
     ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
     --build-and-test
diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt
index a44988e..ce5d57b 100644
--- a/Tests/VSExternalInclude/CMakeLists.txt
+++ b/Tests/VSExternalInclude/CMakeLists.txt
@@ -1,12 +1,6 @@
 cmake_minimum_required (VERSION 3.5)
 project(VSExternalInclude)
 
-if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124567]")
-  set(PROJECT_EXT vcxproj)
-else()
-  set(PROJECT_EXT vcproj)
-endif()
-
 # make sure directories exists
 set(LIB1_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib1)
 make_directory("${LIB1_BINARY_DIR}")
@@ -37,9 +31,9 @@
 message("CMAKE Ran with the following output:\n\"${OUT}\"")
 
 
-include_external_msproject(lib1 ${VSExternalInclude_BINARY_DIR}/Lib1/LIB1.${PROJECT_EXT})
+include_external_msproject(lib1 ${VSExternalInclude_BINARY_DIR}/Lib1/LIB1.vcxproj)
 # lib2 depends on lib1
-include_external_msproject(lib2 ${VSExternalInclude_BINARY_DIR}/Lib2/LIB2.${PROJECT_EXT} lib1)
+include_external_msproject(lib2 ${VSExternalInclude_BINARY_DIR}/Lib2/LIB2.vcxproj lib1)
 
 include_directories(${VSExternalInclude_SOURCE_DIR}/Lib2 ${VSExternalInclude_SOURCE_DIR}/Lib1)
 
@@ -55,9 +49,7 @@
 # and the sln file can no longer be the only source
 # of that depend.  So, for VS 10 make the executable
 # depend on lib1 and lib2
-if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124567]")
-  add_dependencies(VSExternalInclude lib1)
-endif()
+add_dependencies(VSExternalInclude lib1)
 
 # Interaction testing between the FOLDER target property and
 # INCLUDE_EXTERNAL_MSPROJECT targets:
diff --git a/Tests/VSXaml/CMakeLists.txt b/Tests/VSXaml/CMakeLists.txt
index f384c82..fcb911a 100644
--- a/Tests/VSXaml/CMakeLists.txt
+++ b/Tests/VSXaml/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 3.2)
+# FIXME(#26248): This test is not executed anymore!
+cmake_minimum_required(VERSION 3.5)
 project(VSXaml)
 
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)