Merge topic 'vs71-deprecate'

ce82e0a5 Deprecate Visual Studio 7 .NET 2003 generator
6a501b65 Tests: Drop test for VS 7.0 generator deprecation warnings
This commit is contained in:
Brad King 2016-04-29 13:28:33 -04:00 committed by CMake Topic Stage
commit 9d2e306e98
10 changed files with 42 additions and 14 deletions

View File

@ -1,4 +1,10 @@
Visual Studio 7 .NET 2003
-------------------------
Generates Visual Studio .NET 2003 project files.
Deprecated. Generates Visual Studio .NET 2003 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 7.1 tools using the
:generator:`NMake Makefiles` generator.

View File

@ -0,0 +1,5 @@
vs71-deprecate
--------------
* The :generator:`Visual Studio 7 .NET 2003` generator is now
deprecated and will be removed in a future version of CMake.

View File

@ -325,5 +325,5 @@ void cmGlobalVisualStudio71Generator
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = cmGlobalVisualStudio71Generator::GetActualName();
entry.Brief = "Generates Visual Studio .NET 2003 project files.";
entry.Brief = "Deprecated. Generates Visual Studio .NET 2003 project files.";
}

View File

@ -335,6 +335,23 @@ void cmGlobalVisualStudio7Generator::Generate()
{
this->CallVisualStudioMacro(MacroReload);
}
if (this->Version == VS71 &&
!this->CMakeInstance->GetIsInTryCompile())
{
const char* cmakeWarnVS71 =
this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS71");
if (!cmakeWarnVS71 || !cmSystemTools::IsOff(cmakeWarnVS71))
{
this->CMakeInstance->IssueMessage(
cmake::WARNING,
"The \"Visual Studio 7 .NET 2003\" generator is deprecated "
"and will be removed in a future version of CMake."
"\n"
"Add CMAKE_WARN_VS71=OFF to the cache to disable this warning."
);
}
}
}
void cmGlobalVisualStudio7Generator

View File

@ -1,5 +0,0 @@
^CMake Warning:
The "Visual Studio 7" generator is deprecated and will be removed in a
future version of CMake.
Add CMAKE_WARN_VS70=OFF to the cache to disable this warning.$

View File

@ -0,0 +1,5 @@
^CMake Warning:
The "Visual Studio 7 .NET 2003" generator is deprecated and will be removed
in a future version of CMake.
Add CMAKE_WARN_VS71=OFF to the cache to disable this warning.$

View File

@ -72,11 +72,11 @@ if(RunCMake_GENERATOR STREQUAL "Ninja")
unset(RunCMake_TEST_NO_CLEAN)
endif()
if(RunCMake_GENERATOR STREQUAL "Visual Studio 7")
set(RunCMake_WARN_VS70 1)
run_cmake(DeprecateVS70-WARN-ON)
unset(RunCMake_WARN_VS70)
run_cmake(DeprecateVS70-WARN-OFF)
if(RunCMake_GENERATOR STREQUAL "Visual Studio 7 .NET 2003")
set(RunCMake_WARN_VS71 1)
run_cmake(DeprecateVS71-WARN-ON)
unset(RunCMake_WARN_VS71)
run_cmake(DeprecateVS71-WARN-OFF)
endif()
if(UNIX)

View File

@ -51,8 +51,8 @@ function(run_cmake test)
if(APPLE)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
endif()
if(RunCMake_GENERATOR STREQUAL "Visual Studio 7" AND NOT RunCMake_WARN_VS70)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_WARN_VS70=OFF)
if(RunCMake_GENERATOR STREQUAL "Visual Studio 7 .NET 2003" AND NOT RunCMake_WARN_VS71)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_WARN_VS71=OFF)
endif()
if(RunCMake_MAKE_PROGRAM)
list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")