[x265] [PATCH] Fix CMake build error with latest CMake 4.0 release

Yaswanth Sastry yaswanth.sastry at multicorewareinc.com
Mon Feb 24 12:27:31 UTC 2025


CMake 4.0 no longer supports forcing the OLD behavior for policies CMP0025 and CMP0054.
>From 808b476f711c654cff9fdb3213b96bd8c34b9ce2 Mon Sep 17 00:00:00 2001
From: yaswanthsastry <yaswanth.sastry at multicorewareinc.com>
Date: Mon, 24 Feb 2025 17:07:03 +0530
Subject: [PATCH] Fix CMake build error with latest CMake 4.0 release

---
 source/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 37dbe1a87..4f5b3ed82 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -7,13 +7,13 @@ if(NOT CMAKE_BUILD_TYPE)
 endif()
 message(STATUS "cmake version ${CMAKE_VERSION}")
 if(POLICY CMP0025)
-    cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
+    cmake_policy(SET CMP0025 NEW) # report Apple's Clang as just Clang
 endif()
 if(POLICY CMP0042)
     cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
 endif()
 if(POLICY CMP0054)
-    cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
+    cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted
 endif()

 project (x265)
--
2.37.3.windows.1




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250224/29abc598/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patchcmake.diff
Type: application/octet-stream
Size: 1109 bytes
Desc: patchcmake.diff
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250224/29abc598/attachment.obj>


More information about the x265-devel mailing list