Skip to content

Commit 61bc619

Browse files
authored
CMake 4.x. windows (OrcaSlicer#10820)
* cmake 4 windows Update CMakeLists.txt cmake 4 windows Update build_release_vs2022.bat minimum version 3.5 * Update CMakeLists.txt
1 parent a7adeb6 commit 61bc619

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cmake_minimum_required(VERSION 3.13)
22

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

88
if (WIN32)

build_release_vs2022.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ if "%1"=="slicer" (
4646
echo "building deps.."
4747

4848
echo on
49+
REM Set minimum CMake policy to avoid <3.5 errors
50+
set CMAKE_POLICY_VERSION_MINIMUM=3.5
4951
cmake ../ -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=%build_type%
5052
cmake --build . --config %build_type% --target deps -- -m
5153
@echo off

0 commit comments

Comments
 (0)