Drop Visual Studio 9 2008 generator

This generator has been deprecated since CMake 3.27.  Remove it.
This commit is contained in:
Brad King
2024-05-06 12:40:04 -04:00
parent 88c70dde34
commit 03c31b0395
63 changed files with 71 additions and 496 deletions

View File

@@ -4,7 +4,7 @@ CMAKE_MSVCIDE_RUN_PATH
.. include:: ENV_VAR.txt .. include:: ENV_VAR.txt
Extra PATH locations for custom commands when using 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 ``CMAKE_MSVCIDE_RUN_PATH`` environment variable sets the default value for
the :variable:`CMAKE_MSVCIDE_RUN_PATH` variable if not already explicitly set. the :variable:`CMAKE_MSVCIDE_RUN_PATH` variable if not already explicitly set.

View File

@@ -1,41 +1,9 @@
Visual Studio 9 2008 Visual Studio 9 2008
-------------------- --------------------
Deprecated. Generates Visual Studio 9 2008 project files. Removed. This once generated Visual Studio 9 2008 project files, but
the generator has been removed since CMake 3.30. It is still possible
.. note:: to build with VS 9 2008 tools using the :generator:`Visual Studio 14 2015`
This generator is deprecated and will be removed in a future version generator (or above, and with VS 10 2010 also installed) with
of CMake. It will still be possible to build with VS 9 2008 tools :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v90``, or by using
using the :generator:`Visual Studio 14 2015` generator (or above, the :generator:`NMake Makefiles` generator.
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 <WinCE-SDK>``
(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 <WinCE-SDK>``
Specify target platform matching a Windows CE SDK name.

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. solution global section. Whitespace around key and value is ignored.
List elements which do not contain an equal sign are skipped. 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 on other generators. The property only applies when set on a
directory whose ``CMakeLists.txt`` contains a :command:`project` command. 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. solution global section. Whitespace around key and value is ignored.
List elements which do not contain an equal sign are skipped. 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 on other generators. The property only applies when set on a
directory whose ``CMakeLists.txt`` contains a :command:`project` command. directory whose ``CMakeLists.txt`` contains a :command:`project` command.

View File

@@ -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 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 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 file builds. The flags will be added after target-wide flags.
some cases not supported by the :generator:`Visual Studio 9 2008` generator).
Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions. Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions.

View File

@@ -7,8 +7,7 @@ List of additional options to pass to the compiler.
This property holds a :ref:`semicolon-separated list <CMake Language Lists>` This property holds a :ref:`semicolon-separated list <CMake Language Lists>`
of options and will be added to the list of compile flags when this source 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 file builds. The options will be added after target-wide options.
some cases not supported by the :generator:`Visual Studio 9 2008` generator).
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual

View File

@@ -4,7 +4,7 @@ DEPLOYMENT_ADDITIONAL_FILES
.. versionadded:: 3.13 .. versionadded:: 3.13
Set the WinCE project ``AdditionalFiles`` in ``DeploymentTool`` in ``.vcproj`` 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. This is useful when you want to debug on remote WinCE device.
Specify additional files that will be copied to the device. Specify additional files that will be copied to the device.
For example: For example:

View File

@@ -5,7 +5,7 @@ DEPLOYMENT_REMOTE_DIRECTORY
Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and
``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated ``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. This is useful when you want to debug on remote WinCE device.
For example: For example:

View File

@@ -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 .. include:: ../variable/LINKER_PREDEFINED_TYPES.txt
This property is not supported on :generator:`Green Hills MULTI` and This property is not supported on :generator:`Green Hills MULTI` generator.
:generator:`Visual Studio 9 2008` generators.
The implementation details for the selected linker will be provided by the The implementation details for the selected linker will be provided by the
:variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>` variable. For example: :variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>` variable. For example:

View File

@@ -1,12 +1,9 @@
VS_GLOBAL_KEYWORD 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. Sets the "keyword" attribute for a generated Visual Studio project.
Defaults to "Win32Proj". You may wish to override this value with Defaults to "Win32Proj". You may wish to override this value with
"ManagedCProj", for example, in a Visual Studio managed C++ unit test "ManagedCProj", for example, in a Visual Studio managed C++ unit test
project. project.
Use the :prop_tgt:`VS_KEYWORD` target property to set the
keyword for Visual Studio 9 (2008) and older.

View File

@@ -1,10 +1,9 @@
VS_KEYWORD VS_KEYWORD
---------- ----------
Visual Studio project keyword for VS 9 (2008) and older. Removed. This once specified the Visual Studio project keyword
for the :generator:`Visual Studio 9 2008` generator, and older,
Can be set to change the visual studio keyword, for example Qt but all of those generators have been removed.
integration works better if this is set to Qt4VSv1.0.
Use the :prop_tgt:`VS_GLOBAL_KEYWORD` target property to set the Use the :prop_tgt:`VS_GLOBAL_KEYWORD` target property to set the
keyword for Visual Studio 12 (2013) and newer. keyword for Visual Studio 12 (2013) and newer.

View File

@@ -0,0 +1,4 @@
remove-vs9-generator
--------------------
* The :generator:`Visual Studio 9 2008` generator has been removed.

View File

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

View File

@@ -5,7 +5,7 @@ CMAKE_MSVCIDE_RUN_PATH
Extra PATH locations that should be used when executing Extra PATH locations that should be used when executing
:command:`add_custom_command` or :command:`add_custom_target` when using the :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. 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`` If not set explicitly the value is initialized by the ``CMAKE_MSVCIDE_RUN_PATH``

View File

@@ -1,7 +1,7 @@
CMAKE_VS_DEVENV_COMMAND 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 variable to the ``devenv.com`` command installed with the corresponding
Visual Studio version. Note that this variable may be empty on Visual Studio version. Note that this variable may be empty on
Visual Studio Express editions because they do not provide this tool. Visual Studio Express editions because they do not provide this tool.

View File

@@ -1,7 +1,7 @@
CMAKE_VS_INTEL_Fortran_PROJECT_VERSION 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 Fortran plugin installed, this specifies the ``.vfproj`` project file format
version. This is intended for internal use by CMake and should not be version. This is intended for internal use by CMake and should not be
used by project code. used by project code.

View File

@@ -257,11 +257,6 @@ function(check_ipo_supported)
endif() endif()
endforeach() endforeach()
if(CMAKE_GENERATOR MATCHES "^Visual Studio 9 ")
_ipo_not_supported("CMake doesn't support IPO for current generator")
return()
endif()
foreach(x ${languages}) foreach(x ${languages})
_ipo_run_language_check(${x}) _ipo_run_language_check(${x})
endforeach() endforeach()

View File

@@ -886,8 +886,6 @@ if(WIN32)
cmGlobalVisualStudio7Generator.h cmGlobalVisualStudio7Generator.h
cmGlobalVisualStudio8Generator.cxx cmGlobalVisualStudio8Generator.cxx
cmGlobalVisualStudio8Generator.h cmGlobalVisualStudio8Generator.h
cmGlobalVisualStudio9Generator.cxx
cmGlobalVisualStudio9Generator.h
cmVisualStudioGeneratorOptions.h cmVisualStudioGeneratorOptions.h
cmVisualStudioGeneratorOptions.cxx cmVisualStudioGeneratorOptions.cxx
cmVsProjectType.h cmVsProjectType.h

View File

@@ -1275,12 +1275,6 @@ std::string cmGlobalVisualStudio10Generator::Encoding()
const char* cmGlobalVisualStudio10Generator::GetToolsVersion() const const char* cmGlobalVisualStudio10Generator::GetToolsVersion() const
{ {
switch (this->Version) { 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: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return "12.0"; return "12.0";
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:

View File

@@ -310,26 +310,6 @@ void cmGlobalVisualStudio7Generator::Generate()
GetSLNFile(this->LocalGenerators[0].get())); 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 && if (this->Version == VSVersion::VS12 &&
!this->CMakeInstance->GetIsInTryCompile()) { !this->CMakeInstance->GetIsInTryCompile()) {
std::string cmakeWarnVS12; std::string cmakeWarnVS12;

View File

@@ -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 <cstring>
#include <utility>
#include <vector>
#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<cmGlobalGenerator> 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<cmGlobalGenerator>();
}
const char* p = name.c_str() + sizeof(vs9generatorName) - 1;
if (p[0] == '\0') {
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio9Generator(cm, name, ""));
}
if (!allowArch || p[0] != ' ') {
return std::unique_ptr<cmGlobalGenerator>();
}
++p;
if (!strcmp(p, "IA64")) {
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio9Generator(cm, name, "Itanium"));
}
if (!strcmp(p, "Win64")) {
return std::unique_ptr<cmGlobalGenerator>(
new cmGlobalVisualStudio9Generator(cm, name, "x64"));
}
cmVisualStudioWCEPlatformParser parser(p);
parser.ParseVersion("9.0");
if (!parser.Found()) {
return std::unique_ptr<cmGlobalGenerator>();
}
auto ret = std::unique_ptr<cmGlobalVisualStudio9Generator>(
new cmGlobalVisualStudio9Generator(cm, name, p));
ret->WindowsCEVersion = parser.GetOSVersion();
return std::unique_ptr<cmGlobalGenerator>(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<std::string> GetGeneratorNames() const override
{
std::vector<std::string> names;
names.emplace_back(vs9generatorName);
return names;
}
std::vector<std::string> GetGeneratorNamesWithPlatform() const override
{
std::vector<std::string> names;
names.emplace_back(cmStrCat(vs9generatorName, " Win64"));
names.emplace_back(cmStrCat(vs9generatorName, " IA64"));
cmVisualStudioWCEPlatformParser parser;
parser.ParseVersion("9.0");
const std::vector<std::string>& 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<std::string> GetKnownPlatforms() const override
{
std::vector<std::string> platforms;
platforms.emplace_back("x64");
platforms.emplace_back("Win32");
platforms.emplace_back("Itanium");
cmVisualStudioWCEPlatformParser parser;
parser.ParseVersion("9.0");
const std::vector<std::string>& 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<cmGlobalGeneratorFactory>
cmGlobalVisualStudio9Generator::NewFactory()
{
return std::unique_ptr<cmGlobalGeneratorFactory>(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)";
}

View File

@@ -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 <memory>
#include <string>
#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<cmGlobalGeneratorFactory> 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;
};

View File

@@ -104,8 +104,6 @@ std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const
const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const
{ {
switch (this->Version) { switch (this->Version) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
return "9.0";
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return "12.0"; return "12.0";
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:
@@ -127,10 +125,6 @@ void cmGlobalVisualStudioGenerator::WriteSLNHeader(std::ostream& fout)
fout << '\n'; fout << '\n';
switch (this->Version) { 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: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
if (this->ExpressEdition) { if (this->ExpressEdition) {

View File

@@ -34,7 +34,6 @@ public:
/** Known versions of Visual Studio. */ /** Known versions of Visual Studio. */
enum class VSVersion : uint16_t enum class VSVersion : uint16_t
{ {
VS9 = 90,
VS12 = 120, VS12 = 120,
/* VS13 = 130 was skipped */ /* VS13 = 130 was skipped */
VS14 = 140, VS14 = 140,

View File

@@ -125,8 +125,6 @@ static unsigned int VSVersionToMajor(
cmGlobalVisualStudioGenerator::VSVersion v) cmGlobalVisualStudioGenerator::VSVersion v)
{ {
switch (v) { switch (v) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
return 9;
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return 12; return 12;
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:
@@ -145,8 +143,6 @@ static const char* VSVersionToToolset(
cmGlobalVisualStudioGenerator::VSVersion v) cmGlobalVisualStudioGenerator::VSVersion v)
{ {
switch (v) { switch (v) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
return "v90";
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return "v120"; return "v120";
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:
@@ -165,8 +161,6 @@ static std::string VSVersionToMajorString(
cmGlobalVisualStudioGenerator::VSVersion v) cmGlobalVisualStudioGenerator::VSVersion v)
{ {
switch (v) { switch (v) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
return "9";
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return "12"; return "12";
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:
@@ -185,7 +179,6 @@ static const char* VSVersionToAndroidToolset(
cmGlobalVisualStudioGenerator::VSVersion v) cmGlobalVisualStudioGenerator::VSVersion v)
{ {
switch (v) { switch (v) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return ""; return "";
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:
@@ -485,7 +478,6 @@ bool cmGlobalVisualStudioVersionedGenerator::MatchesGeneratorName(
{ {
std::string genName; std::string genName;
switch (this->Version) { switch (this->Version) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:
break; break;
@@ -752,7 +744,6 @@ cmGlobalVisualStudioVersionedGenerator::GetAndroidApplicationTypeRevision()
const const
{ {
switch (this->Version) { switch (this->Version) {
case cmGlobalVisualStudioGenerator::VSVersion::VS9:
case cmGlobalVisualStudioGenerator::VSVersion::VS12: case cmGlobalVisualStudioGenerator::VSVersion::VS12:
return ""; return "";
case cmGlobalVisualStudioGenerator::VSVersion::VS14: case cmGlobalVisualStudioGenerator::VSVersion::VS14:

View File

@@ -1133,12 +1133,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n"; fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n";
} }
if (this->WindowsCEProject) { if (this->WindowsCEProject) {
if (this->GetVersion() < fout << "\t\t\t\tSubSystem=\"8\"\n";
cmGlobalVisualStudioGenerator::VSVersion::VS9) {
fout << "\t\t\t\tSubSystem=\"9\"\n";
} else {
fout << "\t\t\t\tSubSystem=\"8\"\n";
}
} }
std::string stackVar = cmStrCat("CMAKE_", linkLanguage, "_STACK_SIZE"); std::string stackVar = cmStrCat("CMAKE_", linkLanguage, "_STACK_SIZE");
cmValue stackVal = this->Makefile->GetDefinition(stackVar); cmValue stackVal = this->Makefile->GetDefinition(stackVar);
@@ -1221,12 +1216,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n"; fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n";
} }
if (this->WindowsCEProject) { if (this->WindowsCEProject) {
if (this->GetVersion() < fout << "\t\t\t\tSubSystem=\"8\"\n";
cmGlobalVisualStudioGenerator::VSVersion::VS9) {
fout << "\t\t\t\tSubSystem=\"9\"\n";
} else {
fout << "\t\t\t\tSubSystem=\"8\"\n";
}
if (!linkOptions.GetFlag("EntryPointSymbol")) { if (!linkOptions.GetFlag("EntryPointSymbol")) {
const char* entryPointSymbol = targetOptions.UsingUnicode() const char* entryPointSymbol = targetOptions.UsingUnicode()

View File

@@ -26,7 +26,6 @@ cmVisualStudioGeneratorOptions::cmVisualStudioGeneratorOptions(
cmVS7FlagTable const* extraTable) cmVS7FlagTable const* extraTable)
: cmIDEOptions() : cmIDEOptions()
, LocalGenerator(lg) , LocalGenerator(lg)
, Version(lg->GetVersion())
, CurrentTool(tool) , CurrentTool(tool)
{ {
// Store the given flag tables. // Store the given flag tables.
@@ -75,8 +74,7 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault()
// initialization to off, but the user has the option of removing // initialization to off, but the user has the option of removing
// the flag to disable exception handling. When the user does // the flag to disable exception handling. When the user does
// remove the flag we need to override the IDE default of on. // remove the flag we need to override the IDE default of on.
if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && if (!this->LocalGenerator->IsVFProj()) {
!this->LocalGenerator->IsVFProj()) {
// by default VS puts <ExceptionHandling></ExceptionHandling> empty // by default VS puts <ExceptionHandling></ExceptionHandling> empty
// for a project, to make our projects look the same put a new line // for a project, to make our projects look the same put a new line
// and space over for the closing </ExceptionHandling> as the default // and space over for the closing </ExceptionHandling> as the default
@@ -94,15 +92,12 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose)
// to the generated project to disable logo suppression. Otherwise // to the generated project to disable logo suppression. Otherwise
// the GUI default is to enable suppression. // 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. // "FALSE", instead of an empty string.
if (verbose && if (verbose &&
this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) { this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) {
this->FlagMap["SuppressStartupBanner"] = 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; std::ostringstream oss;
if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && if (!this->LocalGenerator->IsVFProj()) {
!this->LocalGenerator->IsVFProj()) {
oss << "%(" << tag << ')'; oss << "%(" << tag << ')';
} }
auto de = cmRemoveDuplicates(this->Defines); auto de = cmRemoveDuplicates(this->Defines);
for (std::string const& di : cmMakeRange(this->Defines.cbegin(), de)) { for (std::string const& di : cmMakeRange(this->Defines.cbegin(), de)) {
std::string define; std::string define;
if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && if (!this->LocalGenerator->IsVFProj()) {
!this->LocalGenerator->IsVFProj()) {
// Escape the definition for MSBuild. // Escape the definition for MSBuild.
define = di; define = di;
cmVS10EscapeForMSBuild(define); cmVS10EscapeForMSBuild(define);
@@ -424,8 +417,7 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories(
} }
// Escape this include for the MSBuild. // Escape this include for the MSBuild.
if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && if (!this->LocalGenerator->IsVFProj()) {
!this->LocalGenerator->IsVFProj()) {
cmVS10EscapeForMSBuild(include); cmVS10EscapeForMSBuild(include);
} }
oss << sep << include; oss << sep << include;
@@ -437,8 +429,7 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories(
} }
} }
if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && if (!this->LocalGenerator->IsVFProj()) {
!this->LocalGenerator->IsVFProj()) {
oss << sep << "%(" << tag << ')'; oss << sep << "%(" << tag << ')';
} }
@@ -452,8 +443,7 @@ void cmVisualStudioGeneratorOptions::OutputFlagMap(std::ostream& fout,
std::ostringstream oss; std::ostringstream oss;
const char* sep = ""; const char* sep = "";
for (std::string i : m.second) { for (std::string i : m.second) {
if (this->Version != cmGlobalVisualStudioGenerator::VSVersion::VS9 && if (!this->LocalGenerator->IsVFProj()) {
!this->LocalGenerator->IsVFProj()) {
cmVS10EscapeForMSBuild(i); cmVS10EscapeForMSBuild(i);
} }
oss << sep << i; oss << sep << i;

View File

@@ -87,7 +87,6 @@ protected:
private: private:
cmLocalVisualStudioGenerator* LocalGenerator; cmLocalVisualStudioGenerator* LocalGenerator;
cmGlobalVisualStudioGenerator::VSVersion Version;
std::string Configuration; std::string Configuration;
Tool CurrentTool; Tool CurrentTool;

View File

@@ -97,7 +97,6 @@
# include "cmGlobalNMakeMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h"
# include "cmGlobalVisualStudio12Generator.h" # include "cmGlobalVisualStudio12Generator.h"
# include "cmGlobalVisualStudio14Generator.h" # include "cmGlobalVisualStudio14Generator.h"
# include "cmGlobalVisualStudio9Generator.h"
# include "cmGlobalVisualStudioVersionedGenerator.h" # include "cmGlobalVisualStudioVersionedGenerator.h"
# include "cmVSSetupHelper.h" # include "cmVSSetupHelper.h"
@@ -2636,7 +2635,6 @@ std::unique_ptr<cmGlobalGenerator> cmake::EvaluateDefaultGlobalGenerator()
static VSVersionedGenerator const vsGenerators[] = { static VSVersionedGenerator const vsGenerators[] = {
{ "14.0", "Visual Studio 14 2015" }, // { "14.0", "Visual Studio 14 2015" }, //
{ "12.0", "Visual Studio 12 2013" }, // { "12.0", "Visual Studio 12 2013" }, //
{ "9.0", "Visual Studio 9 2008" }
}; };
static const char* const vsEntries[] = { static const char* const vsEntries[] = {
"\\Setup\\VC;ProductDir", // "\\Setup\\VC;ProductDir", //
@@ -3021,7 +3019,6 @@ void cmake::AddDefaultGenerators()
cmGlobalVisualStudioVersionedGenerator::NewFactory15()); cmGlobalVisualStudioVersionedGenerator::NewFactory15());
this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio9Generator::NewFactory());
this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalBorlandMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalJOMMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalJOMMakefileGenerator::NewFactory());
@@ -3781,22 +3778,12 @@ 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 // itself, there is the risk of building an out-of-date solution file due
// to limitations of the underlying build system. // to limitations of the underlying build system.
std::string const stampList = cachePath + "/" + "CMakeFiles/" + std::string const stampList = cachePath + "/" + "CMakeFiles/" +
cmGlobalVisualStudio9Generator::GetGenerateStampList(); cmGlobalVisualStudio12Generator::GetGenerateStampList();
// Note that the stampList file only exists for VS generators. // Note that the stampList file only exists for VS generators.
if (cmSystemTools::FileExists(stampList)) { 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(); this->AddScriptingCommands();
if (this->GlobalGenerator->MatchesGeneratorName("Visual Studio 9 2008")) {
std::string const globVerifyScript =
cachePath + "/" + "CMakeFiles/" + "VerifyGlobs.cmake";
if (cmSystemTools::FileExists(globVerifyScript)) {
std::vector<std::string> args;
this->ReadListFile(args, globVerifyScript);
}
}
if (!cmakeCheckStampList(stampList)) { if (!cmakeCheckStampList(stampList)) {
// Correctly initialize the home (=source) and home output (=binary) // Correctly initialize the home (=source) and home output (=binary)

View File

@@ -42,7 +42,7 @@ list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}")
list(APPEND _cmake_options "-DCMAKE_FORCE_DEPFILES=1") 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) set(TEST_MULTI3 1)
list(APPEND _cmake_options "-DTEST_MULTI3=1") list(APPEND _cmake_options "-DTEST_MULTI3=1")
endif() endif()

View File

@@ -40,9 +40,7 @@ set(ENV{HOME} \"${TEST_HOME}\")
endif() endif()
# Suppress generator deprecation warnings in test suite. # Suppress generator deprecation warnings in test suite.
if(CMAKE_GENERATOR MATCHES "^Visual Studio 9 2008") if(CMAKE_GENERATOR MATCHES "^Visual Studio 12 2013")
set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS9} OFF)")
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 12 2013")
set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS12} OFF)") set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS12} OFF)")
else() else()
set(TEST_WARN_VS_CODE "") set(TEST_WARN_VS_CODE "")
@@ -74,9 +72,6 @@ if(BUILD_TESTING)
set(CMake_TEST_DEVENV "") set(CMake_TEST_DEVENV "")
if(CMAKE_VS_DEVENV_COMMAND) if(CMAKE_VS_DEVENV_COMMAND)
set(CMake_TEST_DEVENV "${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() endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio|Xcode") if(CMAKE_GENERATOR MATCHES "Visual Studio|Xcode")
@@ -472,7 +467,7 @@ if(BUILD_TESTING)
add_subdirectory(ObjCXX) add_subdirectory(ObjCXX)
endif() endif()
if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
ADD_TEST_MACRO(CSharpOnly CSharpOnly) ADD_TEST_MACRO(CSharpOnly CSharpOnly)
if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx) ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx)
@@ -2209,8 +2204,6 @@ if(BUILD_TESTING)
endif() endif()
if(MSVC AND NOT MSVC_VERSION LESS 1310 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") AND (NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64")
) )
ADD_TEST_MACRO(VSMASM VSMASM) ADD_TEST_MACRO(VSMASM VSMASM)
@@ -2221,8 +2214,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(SBCS SBCS) ADD_TEST_MACRO(SBCS SBCS)
endif() endif()
if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio 9 " if(NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90"
AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90"
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx)
ADD_TEST_MACRO(VSManagedCustomCommand) ADD_TEST_MACRO(VSManagedCustomCommand)
@@ -2373,7 +2365,7 @@ if(BUILD_TESTING)
endif() endif()
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) ADD_TEST_MACRO(VSNASM VSNASM)
endif() endif()

View File

@@ -54,7 +54,7 @@ if(CMAKE_Fortran_COMPILER)
add_CMakeOnly_test(CompilerIdFortran) add_CMakeOnly_test(CompilerIdFortran)
set_property(TEST CMakeOnly.CompilerIdFortran APPEND PROPERTY LABELS "Fortran") set_property(TEST CMakeOnly.CompilerIdFortran APPEND PROPERTY LABELS "Fortran")
endif() endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") if(CMAKE_GENERATOR MATCHES "Visual Studio")
add_CMakeOnly_test(CompilerIdCSharp) add_CMakeOnly_test(CompilerIdCSharp)
endif() endif()

View File

@@ -74,10 +74,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang|MSVC)$")
endif() endif()
set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS "-DFLAG_B=2" "-DFLAG_C=2" "-DFLAG_D=1") 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") 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(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_E=1") set_property(SOURCE main.cpp PROPERTY COMPILE_OPTIONS "-DFLAG_E=2")
set_property(SOURCE main.cpp PROPERTY COMPILE_OPTIONS "-DFLAG_E=2")
endif()
endif() endif()
target_link_libraries(CompileOptions testlib) target_link_libraries(CompileOptions testlib)

View File

@@ -98,8 +98,8 @@ if(NOT CMAKE_GENERATOR MATCHES "(Borland|NMake) Makefiles")
# NMake and Borland seem to have no way to encode a single '^'. # NMake and Borland seem to have no way to encode a single '^'.
string(APPEND special_chars "^") string(APPEND special_chars "^")
endif() endif()
if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 2008|Watcom WMake") if(NOT CMAKE_GENERATOR MATCHES "Watcom WMake")
# The vcproj format separates values with ','. # The wmake format does not support ','.
string(APPEND special_chars ",") string(APPEND special_chars ",")
endif() endif()
if(NOT WIN32 AND NOT CYGWIN) if(NOT WIN32 AND NOT CYGWIN)

View File

@@ -180,8 +180,7 @@ if (RunCMake_GENERATOR MATCHES "Makefiles")
unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_NO_CLEAN)
endif() endif()
if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode" AND if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode")
NOT RunCMake_GENERATOR MATCHES "Visual Studio (9|10)( |$)")
unset(run_BuildDepends_skip_step_3) unset(run_BuildDepends_skip_step_3)
run_BuildDepends(CustomCommandDepfile) run_BuildDepends(CustomCommandDepfile)
set(run_BuildDepends_skip_step_3 1) set(run_BuildDepends_skip_step_3 1)
@@ -191,8 +190,7 @@ if(RunCMake_GENERATOR MATCHES "Make")
run_BuildDepends(MakeDependencies) run_BuildDepends(MakeDependencies)
endif() endif()
if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR if(RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7)
(RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7))
# This build tool misses the dependency. # This build tool misses the dependency.
set(run_BuildDepends_skip_step_2 1) set(run_BuildDepends_skip_step_2 1)
endif() endif()

View File

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

View File

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

View File

@@ -4,7 +4,3 @@ run_cmake(CMP0069-OLD)
run_cmake(CMP0069-NEW-cmake) run_cmake(CMP0069-NEW-cmake)
run_cmake(CMP0069-NEW-compiler) run_cmake(CMP0069-NEW-compiler)
run_cmake(CMP0069-WARN) run_cmake(CMP0069-WARN)
if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ")
run_cmake(CMP0069-NEW-generator)
endif()

View File

@@ -736,13 +736,7 @@ endif()
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
add_RunCMake_test(CMAKE_MSVCIDE_RUN_PATH) add_RunCMake_test(CMAKE_MSVCIDE_RUN_PATH)
add_RunCMake_test(include_external_msproject -DVS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME}) 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) add_RunCMake_test(VSSolution)
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(VS10Project add_RunCMake_test(VS10Project
-DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
-DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION} -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}) set_property(TEST RunCMake.Android PROPERTY TIMEOUT ${CMake_TEST_ANDROID_TIMEOUT})
endif() endif()
if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|9[0-9])") if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
add_RunCMake_test(CSharpCustomCommand) add_RunCMake_test(CSharpCustomCommand)
if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
add_RunCMake_test(CSharpReferenceImport) add_RunCMake_test(CSharpReferenceImport)

View File

@@ -262,15 +262,13 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio ")
run_cmake_presets(VisualStudioWin32) run_cmake_presets(VisualStudioWin32)
run_cmake_presets(VisualStudioWin64) run_cmake_presets(VisualStudioWin64)
run_cmake_presets(VisualStudioWin32Override -A x64) run_cmake_presets(VisualStudioWin32Override -A x64)
if(NOT RunCMake_GENERATOR STREQUAL "Visual Studio 9 2008") run_cmake_presets(VisualStudioToolset)
run_cmake_presets(VisualStudioToolset) run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset")
run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset") run_cmake_presets(VisualStudioInheritanceParent)
run_cmake_presets(VisualStudioInheritanceParent) run_cmake_presets(VisualStudioInheritanceChild)
run_cmake_presets(VisualStudioInheritanceChild) run_cmake_presets(VisualStudioInheritanceOverride)
run_cmake_presets(VisualStudioInheritanceOverride) run_cmake_presets(VisualStudioInheritanceMulti)
run_cmake_presets(VisualStudioInheritanceMulti) run_cmake_presets(VisualStudioInheritanceMultiSecond)
run_cmake_presets(VisualStudioInheritanceMultiSecond)
endif()
else() else()
run_cmake_presets(ArchToolsetStrategyNone) run_cmake_presets(ArchToolsetStrategyNone)
run_cmake_presets(ArchToolsetStrategyDefault) run_cmake_presets(ArchToolsetStrategyDefault)

View File

@@ -12,13 +12,8 @@ run_cmake(save-to-result)
run_cmake(cmp0069-is-old) run_cmake(cmp0069-is-old)
if(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE if(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE
AND _CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER AND _CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER)
AND NOT RunCMake_GENERATOR MATCHES "^Visual Studio 9 ")
run_cmake(CMP0138-WARN) run_cmake(CMP0138-WARN)
run_cmake(CMP0138-OLD) run_cmake(CMP0138-OLD)
run_cmake(CMP0138-NEW) run_cmake(CMP0138-NEW)
endif() endif()
if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ")
run_cmake(not-supported-by-generator)
endif()

View File

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

View File

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

View File

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

View File

@@ -1,2 +0,0 @@
^CMake Error at CMakeLists.+
No CMAKE_C_COMPILER could be found.

View File

@@ -1,2 +0,0 @@
^CMake Error at CMakeLists.+
No CMAKE_C_COMPILER could be found.

View File

@@ -393,16 +393,10 @@ function(run_EnvironmentGenerator)
# Envvar shouldn't affect existing build tree # Envvar shouldn't affect existing build tree
run_cmake_command(Envgen-platform-existing ${CMAKE_COMMAND} -E chdir .. run_cmake_command(Envgen-platform-existing ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build Envgen-build) ${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}) run_cmake_command(Envgen-platform-invalid ${CMAKE_COMMAND} ${source_dir})
unset(RunCMake-stderr-file) unset(RunCMake-stderr-file)
# Command line -G implies -A"" # Command line -G implies -A""
run_cmake_command(Envgen-G-implicit-platform ${CMAKE_COMMAND} -G "${RunCMake_GENERATOR}" ${source_dir}) 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}) run_cmake_command(Envgen-A-platform ${CMAKE_COMMAND} -A "fromcli" ${source_dir})
unset(RunCMake-stderr-file) unset(RunCMake-stderr-file)
unset(ENV{CMAKE_GENERATOR_PLATFORM}) unset(ENV{CMAKE_GENERATOR_PLATFORM})
@@ -1124,13 +1118,6 @@ set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${P
run_cmake(ProfilingTest) run_cmake(ProfilingTest)
unset(RunCMake_TEST_OPTIONS) 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") if(RunCMake_GENERATOR MATCHES "^Visual Studio 12 2013")
run_cmake_with_options(DeprecateVS12-WARN-ON -DCMAKE_WARN_VS12=ON) run_cmake_with_options(DeprecateVS12-WARN-ON -DCMAKE_WARN_VS12=ON)
unset(ENV{CMAKE_WARN_VS12}) unset(ENV{CMAKE_WARN_VS12})

View File

@@ -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-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-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")]]) 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. # 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")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/always-configure.cmake" [[message(FATAL_ERROR "always: configure should not run again")]])
endif() 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}) run_cmake_command(CONFIGURE_HANDLED_BY_BUILD-rebuild ${CMAKE_COMMAND} --build . ${BUILD_CONFIG})
endfunction() endfunction()
if(NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 ") __ep_test_CONFIGURE_HANDLED_BY_BUILD()
__ep_test_CONFIGURE_HANDLED_BY_BUILD()
endif()
find_package(Git QUIET) find_package(Git QUIET)
if(GIT_EXECUTABLE) if(GIT_EXECUTABLE)

View File

@@ -3,7 +3,7 @@ include(RunCMake)
set(RunCMake_GENERATOR_PLATFORM "") set(RunCMake_GENERATOR_PLATFORM "")
run_cmake(NoPlatform) 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") set(RunCMake_GENERATOR_PLATFORM "x64")
run_cmake(x64Platform) run_cmake(x64Platform)
else() else()
@@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -A "Test Platform" -A "Extra Platform")
run_cmake(TwoPlatforms) run_cmake(TwoPlatforms)
unset(RunCMake_TEST_OPTIONS) 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) set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake)
run_cmake(TestPlatformToolchain) run_cmake(TestPlatformToolchain)
unset(RunCMake_TEST_OPTIONS) unset(RunCMake_TEST_OPTIONS)

View File

@@ -362,10 +362,7 @@ foreach(DISCOVERY_MODE POST_BUILD PRE_TEST)
run_GoogleTestXML(${DISCOVERY_MODE}) run_GoogleTestXML(${DISCOVERY_MODE})
message("Testing ${DISCOVERY_MODE} discovery mode via DISCOVERY_MODE option...") message("Testing ${DISCOVERY_MODE} discovery mode via DISCOVERY_MODE option...")
run_GoogleTest_discovery_timeout(${DISCOVERY_MODE}) run_GoogleTest_discovery_timeout(${DISCOVERY_MODE})
if(# VS 9 does not rebuild if POST_BUILD command changes. run_GoogleTest_discovery_arg_change(${DISCOVERY_MODE})
NOT "${DISCOVERY_MODE};${RunCMake_GENERATOR}" MATCHES "^POST_BUILD;Visual Studio 9")
run_GoogleTest_discovery_arg_change(${DISCOVERY_MODE})
endif()
run_GoogleTest_discovery_test_list(${DISCOVERY_MODE}) run_GoogleTest_discovery_test_list(${DISCOVERY_MODE})
run_GoogleTest_discovery_test_list_scoped(${DISCOVERY_MODE}) run_GoogleTest_discovery_test_list_scoped(${DISCOVERY_MODE})
run_GoogleTest_discovery_flush_script(${DISCOVERY_MODE}) run_GoogleTest_discovery_flush_script(${DISCOVERY_MODE})

View File

@@ -1,10 +1,5 @@
include(RunCMake) include(RunCMake)
if (RunCMake_GENERATOR MATCHES "Visual Studio 9 2008")
run_cmake(UnsupportedLinkerType)
return()
endif()
run_cmake(InvalidLinkerType1) run_cmake(InvalidLinkerType1)
run_cmake(InvalidLinkerType2) run_cmake(InvalidLinkerType2)

View File

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

View File

@@ -1,5 +0,0 @@
enable_language(C)
set(CMAKE_LINKER_TYPE LDD)
add_executable(main main.c)

View File

@@ -26,8 +26,7 @@ endif()
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows|AIX|SunOS)$|BSD" 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 "^(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_ID MATCHES "^(Intel|IntelLLVM)$" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
AND NOT CMAKE_C_COMPILER_LINKER MATCHES "Visual Studio 9\\.0" AND NOT CMAKE_C_COMPILER_LINKER MATCHES "Microsoft Visual Studio 9\\.0/VC/bin"
AND NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 "
) )
if(NOT CMAKE_C_COMPILER_LINKER OR NOT CMAKE_C_COMPILER_LINKER_ID OR NOT CMAKE_C_COMPILER_LINKER_VERSION) 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" message(SEND_ERROR "C compiler's linker not identified:\n"

View File

@@ -13,9 +13,7 @@ run_cmake(StartupProject)
run_cmake(StartupProjectMissing) run_cmake(StartupProjectMissing)
run_cmake(AddPackageToDefault) run_cmake(AddPackageToDefault)
if(NOT NO_USE_FOLDERS) run_cmake(StartupProjectUseFolders)
run_cmake(StartupProjectUseFolders) run_cmake(CMP0143-WARN)
run_cmake(CMP0143-WARN) run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD")
run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD") run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW")
run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW")
endif()

View File

@@ -19,7 +19,7 @@ run_cmake(TargetImported)
run_cmake(TargetLiteralQuotes) run_cmake(TargetLiteralQuotes)
run_cmake(TargetNotInDir) run_cmake(TargetNotInDir)
if(${RunCMake_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") if(RunCMake_GENERATOR MATCHES "Visual Studio")
run_cmake(RemoveEmptyCommands) run_cmake(RemoveEmptyCommands)
endif() endif()

View File

@@ -16,7 +16,7 @@ run_cmake(Debian6)
run_cmake(UserFallbackScript) 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) run_cmake(VsMSBuild)
else() else()
run_cmake(VsMSBuildMissing) run_cmake(VsMSBuildMissing)

View File

@@ -6,7 +6,7 @@ run_cmake(CustomTypePlatform)
run_cmake(CustomGuidTypePlatform) run_cmake(CustomGuidTypePlatform)
run_cmake(CustomConfig) run_cmake(CustomConfig)
if(RunCMake_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") if(RunCMake_GENERATOR MATCHES "Visual Studio")
run_cmake(SkipGetTargetFrameworkProperties) run_cmake(SkipGetTargetFrameworkProperties)
run_cmake(VSCSharpReference) run_cmake(VSCSharpReference)
endif() endif()