diff options
-rw-r--r-- | Help/generator/Visual Studio 7 .NET 2003.rst | 8 | ||||
-rw-r--r-- | Help/release/dev/vs71-deprecate.rst | 5 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 17 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/DeprecateVS71-WARN-OFF.cmake | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON.cmake | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 3 |
9 files changed, 45 insertions, 2 deletions
diff --git a/Help/generator/Visual Studio 7 .NET 2003.rst b/Help/generator/Visual Studio 7 .NET 2003.rst index 20341402bb..1c086a03de 100644 --- a/Help/generator/Visual Studio 7 .NET 2003.rst +++ b/Help/generator/Visual Studio 7 .NET 2003.rst @@ -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. diff --git a/Help/release/dev/vs71-deprecate.rst b/Help/release/dev/vs71-deprecate.rst new file mode 100644 index 0000000000..194630428d --- /dev/null +++ b/Help/release/dev/vs71-deprecate.rst @@ -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. diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 7b51fdf49c..dd1f2e4807 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -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."; } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index c1c8c77e54..ba498ef2b9 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -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 diff --git a/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-OFF.cmake new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-OFF.cmake diff --git a/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON-stderr.txt new file mode 100644 index 0000000000..2cb01ffe38 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON-stderr.txt @@ -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.$ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON.cmake new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON.cmake diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 7e26ce7789..f449f1d0e3 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -72,6 +72,13 @@ if(RunCMake_GENERATOR STREQUAL "Ninja") unset(RunCMake_TEST_NO_CLEAN) endif() +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) 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 736faf1853..fa0c980503 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 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}") endif() |