Build:add maximum cmake compatible version

This commit is contained in:
runzh-crypto
2025-04-07 20:25:35 +08:00
committed by Kacper Donat
parent 893e4a2ff1
commit 307a4661af

View File

@@ -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