summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-24 18:37:59 (GMT)
committerBrad King <brad.king@kitware.com>2023-06-26 16:41:18 (GMT)
commit75b573a628d4296b237601d2a9cb4c0a05903f96 (patch)
tree78fcbfd433000147384888cccec59876d2c01d1a /Tests
parent61bb728c0c874b85620289fd233bd0deb741a27c (diff)
downloadCMake-75b573a628d4296b237601d2a9cb4c0a05903f96.zip
CMake-75b573a628d4296b237601d2a9cb4c0a05903f96.tar.gz
CMake-75b573a628d4296b237601d2a9cb4c0a05903f96.tar.bz2
Deprecate Visual Studio 12 2013 generator
Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake7
5 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 8e6017e..914ebce 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -42,6 +42,8 @@ endif()
# Suppress generator deprecation warnings in test suite.
if(CMAKE_GENERATOR MATCHES "^Visual Studio 9 2008")
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)")
else()
set(TEST_WARN_VS_CODE "")
endif()
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt
new file mode 100644
index 0000000..b69408e
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^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.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS12-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 53f13e4..611dde2 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -1118,3 +1118,10 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 2008")
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")
+ 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()