Drop Visual Studio 12 2013 generator

This generator has been deprecated since CMake 3.28.  Remove it.
This commit is contained in:
Brad King 2024-08-28 14:10:44 -04:00
parent 7c1b671c3a
commit 241f923a6f
34 changed files with 44 additions and 322 deletions

View File

@ -583,7 +583,7 @@ one of the keywords to make clear the behavior they expect.
Because generator expressions can be used in custom commands,
it is possible to define ``COMMAND`` lines or whole custom commands
which evaluate to empty strings for certain configurations.
For **Visual Studio 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.

View File

@ -4,7 +4,7 @@ CMAKE_MSVCIDE_RUN_PATH
.. 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.

View File

@ -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.

View File

@ -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 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.

View File

@ -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 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.

View File

@ -11,5 +11,5 @@ project file. This property is initialized by the value of the variable
: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.

View File

@ -11,5 +11,5 @@ project file. This property is initialized by the value of the variable
: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.

View File

@ -11,5 +11,5 @@ project file. This property is initialized by the value of the variable
: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.

View File

@ -11,5 +11,5 @@ project file. This property is initialized by the value of the variable
: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.

View File

@ -12,7 +12,7 @@ If the property is unset, Visual Studio uses the first matching
than one ``Main()`` method is available in the current project, the property
becomes mandatory for building the project.
This property only works for Visual Studio 12 2013 and above;
This property only works for :ref:`Visual Studio Generators`;
it is ignored on other generators.
.. code-block:: cmake

View File

@ -6,4 +6,4 @@ 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.
keyword for remaining :ref:`Visual Studio Generators`.

View File

@ -0,0 +1,4 @@
remove-vs12-generator
---------------------
* The :generator:`Visual Studio 12 2013` generator has been removed.

View File

@ -18,7 +18,7 @@ Example values:
::
$(Configuration) = Visual Studio 12 and above
$(Configuration) = Visual Studio
$(CONFIGURATION) = Xcode
. = Make-based tools
. = Ninja

View File

@ -30,8 +30,7 @@ to configure the project:
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 @@ to configure the project:
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`).

View File

@ -4,8 +4,8 @@ CMAKE_MSVCIDE_RUN_PATH
.. 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``

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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)

View File

@ -188,9 +188,8 @@ ensure generated files will receive the required settings.
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 @@ as well as ``SWIG``:
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.

View File

@ -516,13 +516,6 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf)
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 @@ std::string cmGlobalVisualStudio10Generator::Encoding()
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:

View File

@ -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(

View File

@ -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 @@ protected:
// of the toolset is installed
bool IsWindowsPhoneToolsetInstalled() const;
bool IsWindowsStoreToolsetInstalled() const;
private:
class Factory;
friend class Factory;
};

View File

@ -309,26 +309,6 @@ void cmGlobalVisualStudio7Generator::Generate()
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(

View File

@ -104,8 +104,6 @@ std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const
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 @@ void cmGlobalVisualStudioGenerator::WriteSLNHeader(std::ostream& fout)
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";

View File

@ -34,8 +34,6 @@ public:
/** Known versions of Visual Studio. */
enum class VSVersion : uint16_t
{
VS12 = 120,
/* VS13 = 130 was skipped */
VS14 = 140,
VS15 = 150,
VS16 = 160,

View File

@ -125,8 +125,6 @@ static unsigned int VSVersionToMajor(
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 @@ static const char* VSVersionToToolset(
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 @@ static std::string VSVersionToMajorString(
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 @@ static const char* VSVersionToAndroidToolset(
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 @@ bool cmGlobalVisualStudioVersionedGenerator::MatchesGeneratorName(
{
std::string genName;
switch (this->Version) {
case cmGlobalVisualStudioGenerator::VSVersion::VS12:
case cmGlobalVisualStudioGenerator::VSVersion::VS14:
break;
case cmGlobalVisualStudioGenerator::VSVersion::VS15:
@ -744,8 +735,6 @@ cmGlobalVisualStudioVersionedGenerator::GetAndroidApplicationTypeRevision()
const
{
switch (this->Version) {
case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return "";
case cmGlobalVisualStudioGenerator::VSVersion::VS14:
return "2.0";
case cmGlobalVisualStudioGenerator::VSVersion::VS15:

View File

@ -477,11 +477,6 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
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 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
// 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()) {

View File

@ -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 @@ std::unique_ptr<cmGlobalGenerator> cmake::EvaluateDefaultGlobalGenerator()
};
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 @@ void cmake::AddDefaultGenerators()
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 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> 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/" +
cmGlobalVisualStudio12Generator::GetGenerateStampList();
cmGlobalVisualStudio14Generator::GetGenerateStampList();
// Note that the stampList file only exists for VS generators.
if (cmSystemTools::FileExists(stampList)) {

View File

@ -50,13 +50,6 @@ set(ENV{HOME} \"${TEST_HOME}\")
")
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,18 +178,11 @@ if(BUILD_TESTING)
endif()
if(WIN32)
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]")
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 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)
@ -2314,11 +2300,6 @@ if(BUILD_TESTING)
)
endif()
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)
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)
@ -2330,10 +2311,6 @@ if(BUILD_TESTING)
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(CMAKE_GENERATOR MATCHES "Visual Studio" AND nasm)
@ -2457,9 +2434,6 @@ if(BUILD_TESTING)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSAndroid/${name}")
endmacro()
if(tegra AND NOT "${CMake_SOURCE_DIR};${CMake_BINARY_DIR}" MATCHES " ")
if(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()

View File

@ -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.$

View File

@ -1127,13 +1127,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 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})