From 84db8506ffc38381dd2502be41879ffe03d8e8e9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 3 Oct 2024 11:16:42 -0400 Subject: Deprecate compatibility with CMake versions older than 3.10 Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.10. Note that the effective policy version includes `...` treatment. Update the check from commit 3a4791548d (Deprecate compatibility with CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2). --- Help/command/DEPRECATED_POLICY_VERSIONS.txt | 8 +++++++ Help/release/dev/deprecate-pre-3.10.rst | 7 ++++++ Source/cmPolicies.cxx | 4 ++-- Tests/RunCMake/CMP0068/RunCMakeTest.cmake | 1 + Tests/RunCMake/CMP0069/RunCMakeTest.cmake | 1 + .../RunCMake/File_Generate/CMP0070-OLD-stderr.txt | 9 +++++++- .../RunCMake/File_Generate/CMP0070-WARN-stderr.txt | 9 +++++++- .../SourceProperty-CMP0070-OLD-stderr.txt | 9 +++++++- .../GenEx-TARGET_PROPERTY/LOCATION-stderr.txt | 2 +- .../BinInInstallPrefix-CMP0052-OLD-stderr.txt | 2 +- .../SrcInInstallPrefix-CMP0052-OLD-stderr.txt | 2 +- .../CMP0028-OLD-iface-stderr.txt | 2 +- .../LinkItemValidation/CMP0028-OLD-stderr.txt | 2 +- Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt | 2 +- Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt | 2 +- Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt | 2 +- Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt | 2 +- Tests/RunCMake/RunCMake.cmake | 2 +- .../VisibilityPreset/CMP0063-OLD-stderr.txt | 2 +- .../VisibilityPreset/CMP0063-WARN-exe-stderr.txt | 2 +- .../VisibilityPreset/CMP0063-WARN-no-stderr.txt | 2 +- .../VisibilityPreset/CMP0063-WARN-obj-stderr.txt | 2 +- .../VisibilityPreset/CMP0063-WARN-sta-stderr.txt | 2 +- .../cmake_minimum_required/Before3_10-stderr.txt | 26 ++++++++++++++++++++++ .../cmake_minimum_required/Before3_10.cmake | 6 +++++ .../cmake_minimum_required/Before3_5-stderr.txt | 26 ---------------------- .../cmake_minimum_required/Before3_5.cmake | 6 ----- .../CompatBefore24-stderr.txt | 2 +- .../cmake_minimum_required/RunCMakeTest.cmake | 2 +- .../BuildFailure-CMP0061-OLD-stderr.txt | 2 +- Tests/RunCMake/include/CMP0024-WARN-stderr.txt | 2 +- Tests/RunCMake/install/CMP0062-OLD-stderr.txt | 2 +- Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt | 2 +- Tests/RunCMake/project/CMP0048-NEW-stderr.txt | 2 +- Tests/RunCMake/project/CMP0048-OLD-stderr.txt | 2 +- .../project_injected/CMP0048-WARN-stderr.txt | 2 +- Tests/RunCMake/try_compile/CMP0066-stderr.txt | 7 ++++++ 37 files changed, 106 insertions(+), 61 deletions(-) create mode 100644 Help/release/dev/deprecate-pre-3.10.rst create mode 100644 Tests/RunCMake/cmake_minimum_required/Before3_10-stderr.txt create mode 100644 Tests/RunCMake/cmake_minimum_required/Before3_10.cmake delete mode 100644 Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt delete mode 100644 Tests/RunCMake/cmake_minimum_required/Before3_5.cmake diff --git a/Help/command/DEPRECATED_POLICY_VERSIONS.txt b/Help/command/DEPRECATED_POLICY_VERSIONS.txt index 7c68260..f5104d3 100644 --- a/Help/command/DEPRECATED_POLICY_VERSIONS.txt +++ b/Help/command/DEPRECATED_POLICY_VERSIONS.txt @@ -1,3 +1,11 @@ +.. versionchanged:: 3.31 + + Compatibility with versions of CMake older than 3.10 is deprecated. + Calls to :command:`cmake_minimum_required(VERSION)` or + :command:`cmake_policy(VERSION)` that do not specify at least + 3.10 as their policy version (optionally via ``...``) + will produce a deprecation warning in CMake 3.31 and above. + .. versionchanged:: 3.27 Compatibility with versions of CMake older than 3.5 is deprecated. diff --git a/Help/release/dev/deprecate-pre-3.10.rst b/Help/release/dev/deprecate-pre-3.10.rst new file mode 100644 index 0000000..7689039 --- /dev/null +++ b/Help/release/dev/deprecate-pre-3.10.rst @@ -0,0 +1,7 @@ +deprecate-pre-3.10 +------------------ + +* Compatibility with versions of CMake older than 3.10 is now deprecated + and will be removed from a future version. Calls to + :command:`cmake_minimum_required` or :command:`cmake_policy` that set + the policy version to an older value now issue a deprecation diagnostic. diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index d89c8c8..16aefff 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -261,7 +261,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, { // Warn about policy versions for which support will be removed. if (warnCompat == WarnCompat::On && - (majorVer < 3 || (majorVer == 3 && minorVer < 5)) && + (majorVer < 3 || (majorVer == 3 && minorVer < 10)) && // Avoid warning on calls generated by install(EXPORT) // in CMake versions prior to 3.18. !(majorVer == 2 && minorVer == 6 && patchVer == 0 && @@ -270,7 +270,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, "cmake_policy") == 0)) { mf->IssueMessage( MessageType::DEPRECATION_WARNING, - "Compatibility with CMake < 3.5 will be removed from " + "Compatibility with CMake < 3.10 will be removed from " "a future version of CMake.\n" "Update the VERSION argument value or use a ... suffix " "to tell CMake that the project does not need compatibility with " diff --git a/Tests/RunCMake/CMP0068/RunCMakeTest.cmake b/Tests/RunCMake/CMP0068/RunCMakeTest.cmake index 88a6225..49734ca 100644 --- a/Tests/RunCMake/CMP0068/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0068/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0068-OLD) run_cmake(CMP0068-NEW) diff --git a/Tests/RunCMake/CMP0069/RunCMakeTest.cmake b/Tests/RunCMake/CMP0069/RunCMakeTest.cmake index 6128325..12d20ca 100644 --- a/Tests/RunCMake/CMP0069/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0069/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0069-OLD) run_cmake(CMP0069-NEW-cmake) diff --git a/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt b/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt index bb578e5..185fa5d 100644 --- a/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt +++ b/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt @@ -1,4 +1,11 @@ -^CMake Deprecation Warning at CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0070 will be removed from a future version of CMake. diff --git a/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt b/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt index a7a231b..5f8144a 100644 --- a/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt +++ b/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt @@ -1,4 +1,11 @@ -^(CMake Warning \(dev\) in CMakeLists.txt: +^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +(CMake Warning \(dev\) in CMakeLists.txt: Policy CMP0070 is not set: Define file\(GENERATE\) behavior for relative paths. Run "cmake --help-policy CMP0070" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt index 39735d7..37cc35e 100644 --- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt +++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt @@ -1,4 +1,11 @@ -^CMake Deprecation Warning at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0070 will be removed from a future version of CMake. diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt index fab2ce2..79bc554 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt index d0aef2c..48e8a01 100644 --- a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt +++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt index 4db8209..05c6991 100644 --- a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt +++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt index 55aa1bb..f96567b 100644 --- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt +++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt index f11d8f5..91a0ad7 100644 --- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt +++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt index 6d340b0..1daf114 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9] \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt index 834c781..bc864be 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9] \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt index 2927f52..ecf4616 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMP0058-WARN-by\.cmake:[0-9] \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt index 1ffb416..b5d5b0b 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMP0058-WARN-no\.cmake:[0-9] \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index ea3099f..bf124dd 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -224,7 +224,7 @@ function(run_cmake test) string(REGEX REPLACE [[ ^CMake Deprecation Warning at [^ ]*CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-OLD-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-OLD-stderr.txt index c1c148d..2c04fa0 100644 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-OLD-stderr.txt +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-OLD-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt index e937b3b..a8e610e 100644 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-no-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-no-stderr.txt index d6a435b..6f8719e 100644 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-no-stderr.txt +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-no-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt index a9193ac..150eebb 100644 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt index 7b7498e..3ea8864 100644 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/cmake_minimum_required/Before3_10-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_10-stderr.txt new file mode 100644 index 0000000..5709684 --- /dev/null +++ b/Tests/RunCMake/cmake_minimum_required/Before3_10-stderr.txt @@ -0,0 +1,26 @@ +^CMake Deprecation Warning at Before3_10\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. 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_10\.cmake:2 \(cmake_policy\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. 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_10\.cmake:6 \(cmake_policy\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. 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_10.cmake b/Tests/RunCMake/cmake_minimum_required/Before3_10.cmake new file mode 100644 index 0000000..0b010ef --- /dev/null +++ b/Tests/RunCMake/cmake_minimum_required/Before3_10.cmake @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.9) +cmake_policy(VERSION 2.6) +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) # simulate pre-3.18 install(EXPORT)-generated call +cmake_policy(POP) +cmake_policy(VERSION 3.9) diff --git a/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt deleted file mode 100644 index 7981235..0000000 --- a/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt +++ /dev/null @@ -1,26 +0,0 @@ -^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 value or use a \.\.\. 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 value or use a \.\.\. 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 value or use a \.\.\. 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.cmake b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake deleted file mode 100644 index 220e359..0000000 --- a/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -cmake_policy(VERSION 2.6) -cmake_policy(PUSH) -cmake_policy(VERSION 2.6) # simulate pre-3.18 install(EXPORT)-generated call -cmake_policy(POP) -cmake_policy(VERSION 2.8.11) diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt index 3eb980a..816cdac 100644 --- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt +++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CompatBefore24\.cmake:1 \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake index 36c44cb..2851c72 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(Before3_5) +run_cmake(Before3_10) run_cmake(Range) run_cmake(RangeBad) run_cmake(Unknown) diff --git a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt index f5d57e9..9a62174 100644 --- a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt +++ b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt @@ -1,6 +1,6 @@ ^CMake Deprecation Warning at [^ ]*/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD/test\.cmake:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt index 8472f41..6cf4a7b 100644 --- a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMP0024-WARN\.cmake:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt index 6b4c4b0..8eeef65 100644 --- a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt +++ b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt index 5dd76f7..7453290 100644 --- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt +++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at GET-CMP0007-WARN\.cmake:1 \(cmake_policy\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/project/CMP0048-NEW-stderr.txt b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt index ad75f43..dde1afc 100644 --- a/Tests/RunCMake/project/CMP0048-NEW-stderr.txt +++ b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt index 376249b..1fb207f 100644 --- a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt +++ b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt @@ -1,5 +1,5 @@ ^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt index c72534f..cb5d874 100644 --- a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt +++ b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt @@ -12,7 +12,7 @@ This warning is for project developers. Use -Wno-dev to suppress it\. + CMake Deprecation Warning at CMakeLists\.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 3\.5 will be removed from a future version of + Compatibility with CMake < 3\.10 will be removed from a future version of CMake\. Update the VERSION argument value or use a \.\.\. suffix to tell diff --git a/Tests/RunCMake/try_compile/CMP0066-stderr.txt b/Tests/RunCMake/try_compile/CMP0066-stderr.txt index 0b92dcf..0b621f0 100644 --- a/Tests/RunCMake/try_compile/CMP0066-stderr.txt +++ b/Tests/RunCMake/try_compile/CMP0066-stderr.txt @@ -1,3 +1,10 @@ +^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.10 will be removed from a future version of + CMake\. + + Update the VERSION argument value or use a \.\.\. suffix to tell + CMake that the project does not need compatibility with older versions\. ++ before try_compile with CMP0066 WARN-default after try_compile with CMP0066 WARN-default * -- cgit v0.12