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.
This commit is contained in:
Martin Storsjö committed 2025-04-02 11:45:35 +03:00
1 parent 56b7ba6871
commit debafe1a80
1 file changed
+1
+1
View File
@@ -140,6 +140,7 @@ cd $BUILDDIR
[ -n "$NO_RECONF" ] || rm -rf CMake* [ -n "$NO_RECONF" ] || rm -rf CMake*
cmake \ cmake \
${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \ ${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
$CMAKEFLAGS \ $CMAKEFLAGS \