summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCMake.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-02-06 19:00:00 (GMT)
committerBrad King <brad.king@kitware.com>2023-02-09 21:20:31 (GMT)
commit3092b14ed0c6f468f1c7499b987232a6528e5a59 (patch)
treefe3d3f05ffe62e215575ba77bac61d83cdd3d25a /Tests/RunCMake/RunCMake.cmake
parent536f35c4f155d9d6b234659562bb34607c9b93ce (diff)
downloadCMake-3092b14ed0c6f468f1c7499b987232a6528e5a59.zip
CMake-3092b14ed0c6f468f1c7499b987232a6528e5a59.tar.gz
CMake-3092b14ed0c6f468f1c7499b987232a6528e5a59.tar.bz2
Tests: Teach RunCMake to optionally ignore policy version deprecation warnings
Avoid requiring tests for deprecated behavior to match the warnings explicitly.
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r--Tests/RunCMake/RunCMake.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 54d7eb5..cfc84ca 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -186,6 +186,18 @@ function(run_cmake test)
"|[^\n]*Bullseye Testing Technology"
")[^\n]*\n)+"
)
+ if(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION)
+ string(REGEX REPLACE [[
+^CMake Deprecation Warning at [^
+]*CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2\.8\.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell
+ CMake that the project does not need compatibility with older versions\.
++
+]] "" actual_stderr "${actual_stderr}")
+ endif()
foreach(o IN ITEMS stdout stderr config)
string(REGEX REPLACE "\r\n" "\n" actual_${o} "${actual_${o}}")
string(REGEX REPLACE "${ignore_line_regex}" "\\1" actual_${o} "${actual_${o}}")