CMake 4.x. windows (#10820)

* cmake 4 windows

Update CMakeLists.txt

cmake 4 windows

Update build_release_vs2022.bat

minimum version 3.5

* Update CMakeLists.txt
This commit is contained in:
Rodrigo Faselli 2025-11-11 23:40:49 -03:00 committed by GitHub
parent a7adeb6305
commit 61bc6193ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.13)
# Verify that your CMake version is exactly 3.31.x series or lower on windows
if ( ((MSVC) OR (WIN32)) AND (${CMAKE_VERSION} VERSION_GREATER_EQUAL "4.0") )
message(FATAL_ERROR "Only cmake versions between 3.13.x and 3.31.x is supported on windows. Detected version: ${CMAKE_VERSION}")
# Verify that your CMake version is exactly 3.5 series or higher on windows
if ( (MSVC OR WIN32) AND (${CMAKE_VERSION} VERSION_LESS "3.5") )
message(FATAL_ERROR "CMake current version ${CMAKE_VERSION} is too old. Minimum required is 3.5.")
endif()
if (WIN32)

View file

@ -46,6 +46,8 @@ if "%1"=="slicer" (
echo "building deps.."
echo on
REM Set minimum CMake policy to avoid <3.5 errors
set CMAKE_POLICY_VERSION_MINIMUM=3.5
cmake ../ -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=%build_type%
cmake --build . --config %build_type% --target deps -- -m
@echo off