diff options
author | Brad King <brad.king@kitware.com> | 2023-06-07 14:38:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-06-07 18:31:50 (GMT) |
commit | 9ba9b6c658dd086129687e0345e5968b60051ca7 (patch) | |
tree | 684b7fa4fcce59223f1e394aa2fd24d04e836ec9 /Tests/RunCMake/CMP0118 | |
parent | bb08c70e019f50a6031028b9ea27a1e9bb75430f (diff) | |
download | CMake-9ba9b6c658dd086129687e0345e5968b60051ca7.zip CMake-9ba9b6c658dd086129687e0345e5968b60051ca7.tar.gz CMake-9ba9b6c658dd086129687e0345e5968b60051ca7.tar.bz2 |
Add deprecation warnings for policies CMP0120 and below
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for policies
introduced in CMake 3.20 and below to encourage projects to port
away from setting policies to OLD.
Diffstat (limited to 'Tests/RunCMake/CMP0118')
18 files changed, 216 insertions, 18 deletions
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt index 2af72a4..9285f9d 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt @@ -1,4 +1,15 @@ -^prop: `0` +^CMake Deprecation Warning at CMP0118-OLD-Test1\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +prop: `0` CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(target_sources\): Cannot find source file: diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt index 6109f65..9bd3d33 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source0\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test10\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source0\.txt: # 1a # GENERATED = `1` Generated_source0\.txt: # 1b # GENERATED = `1` Generated_source0\.txt: # 2a # GENERATED = `1` Generated_source0\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt index e5e97de..4730caf 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source0\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test11\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source0\.txt: # 1a # GENERATED = `1` Generated_source0\.txt: # 1b # GENERATED = `1` Generated_source0\.txt: # 2a # GENERATED = `1` Generated_source0\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt index e6c429c..69a07e1 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt @@ -1,4 +1,15 @@ -^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): +^CMake Deprecation Warning at CMP0118-OLD-Test12\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): TARGET 'custom[4-6]' was not created in this directory\. + CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt index 75dbf23..45c1dcb 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt @@ -1,4 +1,15 @@ -^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): +^CMake Deprecation Warning at CMP0118-OLD-Test13\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): TARGET 'custom[4-6]' was not created in this directory\. + CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt index f5b3d1a..7ade0cf 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source0\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test14\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source0\.txt: # 1a # GENERATED = `1` Generated_source0\.txt: # 1b # GENERATED = `1` Generated_source0\.txt: # 2a # GENERATED = `1` Generated_source0\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt index a30bc84..5735539 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source0\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test15\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source0\.txt: # 1a # GENERATED = `1` Generated_source0\.txt: # 1b # GENERATED = `1` Generated_source0\.txt: # 2a # GENERATED = `1` Generated_source0\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt index 403ce5a..74eb3e1 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt @@ -1 +1,12 @@ -^prop: `1`$ +^CMake Deprecation Warning at CMP0118-OLD-Test2\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt index 4f4fea3..cce5b19 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt @@ -1,4 +1,15 @@ -^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test3\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `1` Generated_with_full_path1\.txt: # 1b # GENERATED = `1` Generated_with_full_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_path1\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt index 3c80531..47eee2e 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt @@ -1,4 +1,15 @@ -^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test3b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `1` Generated_with_full_path1\.txt: # 1b # GENERATED = `1` Generated_with_full_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_path1\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt index 9600fee..f17c9be 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt @@ -1,4 +1,15 @@ -^Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +^CMake Deprecation Warning at CMP0118-OLD-Test4\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` Generated_with_full_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_path1\.txt: # 2a # GENERATED = `0` Generated_with_full_path1\.txt: # 2b # GENERATED = `0` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt index e638660..388e90e 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt @@ -1,4 +1,15 @@ -^Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +^CMake Deprecation Warning at CMP0118-OLD-Test4b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` Generated_with_full_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_path1\.txt: # 2a # GENERATED = `0` Generated_with_full_path1\.txt: # 2b # GENERATED = `0` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt index 18e6a8c..4a67fa7 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt @@ -1,4 +1,15 @@ -^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test5\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `1` Generated_with_full_path1\.txt: # 1b # GENERATED = `1` Generated_with_full_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_path1\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt index a60545f..0cad373 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source1\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test6\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source1\.txt: # 1a # GENERATED = `1` Generated_source1\.txt: # 1b # GENERATED = `1` Generated_source1\.txt: # 2a # GENERATED = `1` Generated_source1\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt index fd496cb..7f232d5 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source1\.txt: # 1a # GENERATED = `1` +^CMake Deprecation Warning at CMP0118-OLD-Test7\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source1\.txt: # 1a # GENERATED = `1` Generated_source1\.txt: # 1b # GENERATED = `1` Generated_source1\.txt: # 2a # GENERATED = `1` Generated_source1\.txt: # 2b # GENERATED = `1` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt index 3505242..dd9d2ef 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source1\.txt: # 1a # GENERATED = `0` +^CMake Deprecation Warning at CMP0118-OLD-Test8\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source1\.txt: # 1a # GENERATED = `0` Generated_source1\.txt: # 1b # GENERATED = `0` Generated_source1\.txt: # 2a # GENERATED = `0` Generated_source1\.txt: # 2b # GENERATED = `0` diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt index 63a9341..e01f782 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt @@ -1,4 +1,15 @@ -^Generated_source1\.txt: # 1a # GENERATED = `0` +^CMake Deprecation Warning at CMP0118-OLD-Test9\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source1\.txt: # 1a # GENERATED = `0` Generated_source1\.txt: # 1b # GENERATED = `0` Generated_source1\.txt: # 2a # GENERATED = `0` Generated_source1\.txt: # 2b # GENERATED = `0` diff --git a/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt b/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt index 5e9cf6c..2fc472b 100644 --- a/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt @@ -1,4 +1,15 @@ -^CMake Error at GenInSubdir/CMakeLists\.txt:[0-9]+ \(target_sources\): +^CMake Deprecation Warning at GenInSubdir-OLD\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at GenInSubdir/CMakeLists\.txt:[0-9]+ \(target_sources\): Cannot find source file: [^ |