diff options
author | Brad King <brad.king@kitware.com> | 2022-09-28 14:40:25 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-09-28 14:40:32 (GMT) |
commit | 43a0206dad9cc677f140c43ddcfcb626d923567d (patch) | |
tree | 6d41f0e6a2932dafb8679811d88f5c56f972bb66 /Tests | |
parent | b9968f3006cc1d072eb6a9afebc44a56016b2fcb (diff) | |
parent | 6c1337cb79341ec0f9aac617419b6311b6d601af (diff) | |
download | CMake-43a0206dad9cc677f140c43ddcfcb626d923567d.zip CMake-43a0206dad9cc677f140c43ddcfcb626d923567d.tar.gz CMake-43a0206dad9cc677f140c43ddcfcb626d923567d.tar.bz2 |
Merge topic 'vs11-deprecate'
6c1337cb79 Deprecate Visual Studio 11 2012 generator
5faf145a5b Tests: Drop unused files from RunCMake.CommandLine
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7720
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/EnforceConfig.cmake.in | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/DeprecateVS11-WARN-OFF.cmake (renamed from Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON.cmake (renamed from Tests/RunCMake/CommandLine/DeprecateVS10-WARN-OFF.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 7 |
6 files changed, 20 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 934f054..da87213 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -39,6 +39,13 @@ set(ENV{HOME} \"${TEST_HOME}\") ") endif() +# Suppress generator deprecation warnings in test suite. +if(CMAKE_GENERATOR MATCHES "^Visual Studio 11 2012") + set(TEST_WARN_VS11_CODE "set(ENV{CMAKE_WARN_VS11} OFF)") +else() + set(TEST_WARN_VS11_CODE "") +endif() + # 3.9 or later provides a definitive answer to whether we are multi-config # through a global property. Prior to 3.9, CMAKE_CONFIGURATION_TYPES being set # is assumed to mean multi-config, but developers might modify it so it is diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in index 10f8461..7722d7d 100644 --- a/Tests/EnforceConfig.cmake.in +++ b/Tests/EnforceConfig.cmake.in @@ -36,4 +36,4 @@ unset(ENV{CMAKE_GENERATOR_TOOLSET}) unset(ENV{CMAKE_EXPORT_COMPILE_COMMANDS}) @TEST_HOME_ENV_CODE@ -@TEST_WARN_VS10_CODE@ +@TEST_WARN_VS11_CODE@ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-OFF.cmake index e69de29..e69de29 100644 --- a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake +++ 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/DeprecateVS10-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS11-WARN-ON.cmake index e69de29..e69de29 100644 --- a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-OFF.cmake +++ 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() |