From debafe1a80261fcc91a283f9c06711db74776602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 2 Apr 2025 11:40:38 +0300 Subject: [PATCH] build-lldb-mi: Fix building with CMake 4.0 CMake 4.0 removed compatibility with CMake versions below 3.5. Therefore, it errors out on projects with a cmake_minimum_required() less than 3.5. (Since CMake 3.31, it already warns that compatibility with versions below 3.10 is deprecated.) By passing CMAKE_POLICY_VERSION_MINIMUM=3.5, we indicate that we are ok with configuring this project with the policies of CMake 3.5, even if the project files themselves don't state it. This flag is only recognized by CMake 4.0; older versions will only warn that the manually specified variable is unused. --- build-lldb-mi.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-lldb-mi.sh b/build-lldb-mi.sh index c040e8d..dbcdc71 100755 --- a/build-lldb-mi.sh +++ b/build-lldb-mi.sh @@ -140,6 +140,7 @@ cd $BUILDDIR [ -n "$NO_RECONF" ] || rm -rf CMake* cmake \ ${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ $CMAKEFLAGS \