diff options
author | Brad King <brad.king@kitware.com> | 2023-02-08 16:49:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-08 16:49:27 (GMT) |
commit | d7f440c5dbe787ccf96da490ad813a897c146498 (patch) | |
tree | f6ff1215509899d6d17dbca52eb23cad65a37b32 /Tests/RunCMake/CommandLine | |
parent | 507dcaf5639c8a3e0ae4aeb2792b6926861aebd3 (diff) | |
download | CMake-d7f440c5dbe787ccf96da490ad813a897c146498.zip CMake-d7f440c5dbe787ccf96da490ad813a897c146498.tar.gz CMake-d7f440c5dbe787ccf96da490ad813a897c146498.tar.bz2 |
Deprecate Visual Studio 9 2008 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/CommandLine')
4 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt new file mode 100644 index 0000000..c3329a0 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning: + The "Visual Studio 9 2008" generator is deprecated and will be removed in a + future version of CMake. + + Add CMAKE_WARN_VS9=OFF to the cache to disable this warning.$ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index f48e845..718a2a1 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -1100,6 +1100,13 @@ set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${P run_cmake(ProfilingTest) unset(RunCMake_TEST_OPTIONS) +if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 2008") + run_cmake_with_options(DeprecateVS9-WARN-ON -DCMAKE_WARN_VS9=ON) + unset(ENV{CMAKE_WARN_VS9}) + run_cmake(DeprecateVS9-WARN-ON) + run_cmake_with_options(DeprecateVS9-WARN-OFF -DCMAKE_WARN_VS9=OFF) +endif() + if(RunCMake_GENERATOR MATCHES "^Visual Studio 11 2012") run_cmake_with_options(DeprecateVS11-WARN-ON -DCMAKE_WARN_VS11=ON) unset(ENV{CMAKE_WARN_VS11}) |