summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-27 15:05:53 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-27 15:45:50 (GMT)
commit6c1337cb79341ec0f9aac617419b6311b6d601af (patch)
treeb7d19905b8138ef4b4e98c413cbf80e154f157fa /Tests/RunCMake
parent5faf145a5b31fc59bf3a9730efbf73d70faea50d (diff)
downloadCMake-6c1337cb79341ec0f9aac617419b6311b6d601af.zip
CMake-6c1337cb79341ec0f9aac617419b6311b6d601af.tar.gz
CMake-6c1337cb79341ec0f9aac617419b6311b6d601af.tar.bz2
Deprecate Visual Studio 11 2012 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/RunCMake')
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS11-WARN-OFF.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake7
4 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON-stderr.txt
new file mode 100644
index 0000000..9080942
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+ The "Visual Studio 11 2012" generator is deprecated and will be removed in
+ a future version of CMake.
+
+ Add CMAKE_WARN_VS11=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index dc61759..a2eeddf 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -1071,3 +1071,10 @@ set(ProfilingTestOutput ${RunCMake_TEST_BINARY_DIR}/output.json)
set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${ProfilingTestOutput})
run_cmake(ProfilingTest)
unset(RunCMake_TEST_OPTIONS)
+
+if(RunCMake_GENERATOR MATCHES "^Visual Studio 11 2012")
+ run_cmake_with_options(DeprecateVS11-WARN-ON -DCMAKE_WARN_VS11=ON)
+ unset(ENV{CMAKE_WARN_VS11})
+ run_cmake(DeprecateVS11-WARN-ON)
+ run_cmake_with_options(DeprecateVS11-WARN-OFF -DCMAKE_WARN_VS11=OFF)
+endif()