diff --git a/CMakeLists.txt b/CMakeLists.txt index be6e490c..d90e1341 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,6 +156,12 @@ FetchContent_Declare( EXCLUDE_FROM_ALL ) +# CMake >= 4.0 (e.g. the 4.x bundled with Visual Studio 2026) makes any +# cmake_minimum_required(VERSION < 3.5) a fatal error. Some fetched dependencies still +# declare such old floors (libzmq: 3.0.2), so raise the policy-version floor for the +# FetchContent subprojects. Ignored (harmless) on CMake < 3.30, which lacks this variable. +SET(CMAKE_POLICY_VERSION_MINIMUM 3.5) + # libzmq must be made available BEFORE sls_detector_package for the override above to take effect. FetchContent_MakeAvailable(libzmq) FetchContent_MakeAvailable(zstd sls_detector_package catch2 hdf5 spdlog httplib)