diff options
author | Brad King <brad.king@kitware.com> | 2023-02-09 14:35:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-11 11:25:11 (GMT) |
commit | 3a4791548dfeb69e645e8fea8e669473d4f868cf (patch) | |
tree | cacff3748cdff410a5e0e6219db92f4b83535806 /Tests/RunCMake/cmake_minimum_required | |
parent | 1edf1385064d67885bafe09d472f82bf62d34641 (diff) | |
download | CMake-3a4791548dfeb69e645e8fea8e669473d4f868cf.zip CMake-3a4791548dfeb69e645e8fea8e669473d4f868cf.tar.gz CMake-3a4791548dfeb69e645e8fea8e669473d4f868cf.tar.bz2 |
Deprecate compatibility with CMake versions older than 3.5
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 3.5.
Note that the effective policy version includes `...<max>` treatment.
Update the check from commit 5845c218d7 (Deprecate compatibility with
CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
Diffstat (limited to 'Tests/RunCMake/cmake_minimum_required')
-rw-r--r-- | Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt | 26 | ||||
-rw-r--r-- | Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt | 26 | ||||
-rw-r--r-- | Tests/RunCMake/cmake_minimum_required/Before3_5.cmake (renamed from Tests/RunCMake/cmake_minimum_required/Before2812.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/cmake_minimum_required/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt | 10 | ||||
-rw-r--r-- | Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake | 2 |
6 files changed, 33 insertions, 33 deletions
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt deleted file mode 100644 index 7d40dcb..0000000 --- a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt +++ /dev/null @@ -1,26 +0,0 @@ -^CMake Deprecation Warning at Before2812.cmake: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. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -+ -CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\): - 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. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -+ -CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\): - 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. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt new file mode 100644 index 0000000..7981235 --- /dev/null +++ b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt @@ -0,0 +1,26 @@ +^CMake Deprecation Warning at Before3_5\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 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\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at Before3_5\.cmake:2 \(cmake_policy\): + Compatibility with CMake < 3\.5 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\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at Before3_5\.cmake:6 \(cmake_policy\): + Compatibility with CMake < 3\.5 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\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake index 220e359..220e359 100644 --- a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake +++ b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt index 667561e..8eb5748 100644 --- a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt +++ b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt index 81d26d2..3eb980a 100644 --- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt +++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt @@ -1,9 +1,9 @@ -^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. +^CMake Deprecation Warning at CompatBefore24\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 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. + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake index 3a959bb..36c44cb 100644 --- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake @@ -4,7 +4,7 @@ run_cmake(Before24) run_cmake(CompatBefore24) run_cmake(Future) run_cmake(PolicyBefore24) -run_cmake(Before2812) +run_cmake(Before3_5) run_cmake(Range) run_cmake(RangeBad) run_cmake(Unknown) |