summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/generator/Visual Studio 6.rst8
-rw-r--r--Help/release/dev/vs6-deprecate.rst5
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx18
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/RunCMake.cmake3
8 files changed, 44 insertions, 2 deletions
diff --git a/Help/generator/Visual Studio 6.rst b/Help/generator/Visual Studio 6.rst
index d619354..855589c 100644
--- a/Help/generator/Visual Studio 6.rst
+++ b/Help/generator/Visual Studio 6.rst
@@ -1,4 +1,10 @@
Visual Studio 6
---------------
-Generates Visual Studio 6 project files.
+Deprected. Generates Visual Studio 6 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 6 tools using the
+ :generator:`NMake Makefiles` generator.
diff --git a/Help/release/dev/vs6-deprecate.rst b/Help/release/dev/vs6-deprecate.rst
new file mode 100644
index 0000000..83f9afb
--- /dev/null
+++ b/Help/release/dev/vs6-deprecate.rst
@@ -0,0 +1,5 @@
+vs6-deprecate
+-------------
+
+* The :generator:`Visual Studio 6` generator is now deprecated
+ and will be removed in a future version of CMake.
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 62a308e..e2b2bbd4 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -185,6 +185,22 @@ void cmGlobalVisualStudio6Generator::Generate()
// Now write out the DSW
this->OutputDSWFile();
+
+ if (!this->CMakeInstance->GetIsInTryCompile())
+ {
+ const char* cmakeWarnVS6 =
+ this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS6");
+ if (!cmakeWarnVS6 || !cmSystemTools::IsOff(cmakeWarnVS6))
+ {
+ this->CMakeInstance->IssueMessage(
+ cmake::WARNING,
+ "The \"Visual Studio 6\" generator is deprecated "
+ "and will be removed in a future version of CMake."
+ "\n"
+ "Add CMAKE_WARN_VS6=OFF to the cache to disable this warning."
+ );
+ }
+ }
}
// Write a DSW file to the stream
@@ -411,7 +427,7 @@ void cmGlobalVisualStudio6Generator
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = cmGlobalVisualStudio6Generator::GetActualName();
- entry.Brief = "Generates Visual Studio 6 project files.";
+ entry.Brief = "Deprecated. Generates Visual Studio 6 project files.";
}
//----------------------------------------------------------------------------
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt
new file mode 100644
index 0000000..1b6a510
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+ The "Visual Studio 6" generator is deprecated and will be removed in a
+ future version of CMake.
+
+ Add CMAKE_WARN_VS6=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index f047baf..4242723 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -40,6 +40,13 @@ if(RunCMake_GENERATOR STREQUAL "Ninja")
unset(RunCMake_TEST_NO_CLEAN)
endif()
+if(RunCMake_GENERATOR STREQUAL "Visual Studio 6")
+ set(RunCMake_WARN_VS6 1)
+ run_cmake(DeprecateVS6-WARN-ON)
+ unset(RunCMake_WARN_VS6)
+ run_cmake(DeprecateVS6-WARN-OFF)
+endif()
+
if(UNIX)
run_cmake_command(E_create_symlink-no-arg
${CMAKE_COMMAND} -E create_symlink
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 6333703..e5d3590 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -51,6 +51,9 @@ function(run_cmake test)
if(APPLE)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
endif()
+ if(RunCMake_GENERATOR STREQUAL "Visual Studio 6" AND NOT RunCMake_WARN_VS6)
+ list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_WARN_VS6=OFF)
+ endif()
if(RunCMake_MAKE_PROGRAM)
list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")
endif()