From e5c7dfdedd8945f31fae87882d4d52f47884d6c4 Mon Sep 17 00:00:00 2001 From: madeline Date: Mon, 20 Apr 2026 08:04:05 -0700 Subject: [PATCH] maybe fix apple ci idk this shit is giga fucked --- cmake/fix_capstone_policy.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/fix_capstone_policy.cmake b/cmake/fix_capstone_policy.cmake index 0ff25f82a1..3d7a3ca4bc 100644 --- a/cmake/fix_capstone_policy.cmake +++ b/cmake/fix_capstone_policy.cmake @@ -1,7 +1,13 @@ -# Removes cmake_policy(SET CMP0048 OLD) from capstone 4.0.2 CMakeLists.txt +# Patches capstone's CMakeLists.txt for compatibility with CMake >= 4.0: +# - Removes cmake_policy(SET CMP0048 OLD) (rejected by CMake >= 3.27) +# - Bumps cmake_minimum_required to 3.5 (CMake >= 4.0 dropped < 3.5 support) file(READ "${DIR}/CMakeLists.txt" _content) string(REPLACE "cmake_policy(SET CMP0048 OLD)" "# cmake_policy(SET CMP0048 OLD)" _content "${_content}") +string(REGEX REPLACE + "cmake_minimum_required\\(VERSION [0-9]+\\.[0-9]+(\\.[0-9]+)?\\)" + "cmake_minimum_required(VERSION 3.5)" + _content "${_content}") file(WRITE "${DIR}/CMakeLists.txt" "${_content}")