From 307a4661aff0974f90adbedae148543de85a463f Mon Sep 17 00:00:00 2001 From: runzh-crypto <1206904210@qq.com> Date: Mon, 7 Apr 2025 20:25:35 +0800 Subject: [PATCH] Build:add maximum cmake compatible version --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index abced4aca7..ddbb46ef63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ # As of February 2025 we require CMake 3.22.0 cmake_minimum_required(VERSION 3.22.0 FATAL_ERROR) +# Check for maximum version +if (CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0") + message(FATAL_ERROR "The required CMake version is before 4.0.0.") +endif() # As of cMake 3.27, find_package() will look for both case-sensitive and all-uppercase versions # of the package. This seems to affect FLANN as included by Pixi