Description: Fix FTBFS with CMake >= 4.0: CMP0046 OLD behavior removed
 CMake 4.x no longer supports setting policy CMP0046 to OLD, making the
 configure step fail. Change cmake_policy(SET CMP0046 OLD) to NEW in
 metview/CMakeLists.txt and metview/src/codes_ui/CMakeLists.txt.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed
Last-Update: 2026-10-24

--- metview-5.25.0.orig/metview/CMakeLists.txt
+++ metview-5.25.0/metview/CMakeLists.txt
@@ -108,8 +108,9 @@ endif()
 
 
 # ensure we can add non-existent dependencies - required for generating icon files
+# CMP0046 OLD behavior was removed in CMake >= 4.0; NEW (the mandatory default) is used instead
 if( ${CMAKE_VERSION} VERSION_GREATER "2.9.9" )
-    cmake_policy(SET CMP0046 OLD)
+    cmake_policy(SET CMP0046 NEW)
 endif()
 
 
--- metview-5.25.0.orig/metview/src/codes_ui/CMakeLists.txt
+++ metview-5.25.0/metview/src/codes_ui/CMakeLists.txt
@@ -50,8 +50,9 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.
 endif()
 
 # ensure we can add non-existent dependencies - required for generating icon files
+# CMP0046 OLD behavior was removed in CMake >= 4.0; NEW (the mandatory default) is used instead
 if( ${CMAKE_VERSION} VERSION_GREATER "2.9.9" )
-    cmake_policy(SET CMP0046 OLD)
+    cmake_policy(SET CMP0046 NEW)
 endif()
 
 
