Skip to content

fix(deps): cmake_minimum_required ordering and MSVC 1950+ support for CMake 4.x compat#10876

Closed
BenJule wants to merge 3 commits into
bambulab:masterfrom
BenJule:upstream/fix/cmake4-deps-compat
Closed

fix(deps): cmake_minimum_required ordering and MSVC 1950+ support for CMake 4.x compat#10876
BenJule wants to merge 3 commits into
bambulab:masterfrom
BenJule:upstream/fix/cmake4-deps-compat

Conversation

@BenJule

@BenJule BenJule commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

CMake 4.x requires cmake_minimum_required() to appear before project() in deps/CMakeLists.txt. Without this, builds with CMake 4.0+ fail with a fatal error.

Also adds support for the new MSVC 1950+ toolset (Visual Studio 2026 / v144) in deps-windows.cmake, as the existing code only recognized toolsets up to v143.

  • deps/CMakeLists.txt: move cmake_minimum_required(VERSION 3.5) before project()
  • deps/deps-windows.cmake: add VERSION_GREATER_EQUAL 1950 branch for MSVC v144 toolset detection

@BambulabRobot BambulabRobot requested a review from MackBambu May 26, 2026 01:31
@BenJule BenJule closed this Jun 7, 2026
@BenJule BenJule deleted the upstream/fix/cmake4-deps-compat branch June 7, 2026 10:09
@BenJule BenJule restored the upstream/fix/cmake4-deps-compat branch June 7, 2026 11:36
@BenJule BenJule reopened this Jun 7, 2026
@BenJule

BenJule commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Apologies — this PR was closed by mistake on 2026-06-07, and that was an error on my side, not a deliberate decision to withdraw the change.

It happened as an unintended side effect of a branch cleanup in my fork: deleting the head branch automatically closed this PR. The contribution still stands. I have restored the branch and reopened the PR. Sorry for the noise and any confusion this caused.

@BambulabRobot BambulabRobot requested review from ArthurBambulab and lanewei120 and removed request for lanewei120 June 22, 2026 08:38
@lanewei120 lanewei120 removed the request for review from ArthurBambulab June 24, 2026 00:29
@MackBambu

Copy link
Copy Markdown
Contributor

@lanewei120 LGTM

@lanewei120

Copy link
Copy Markdown
Collaborator

Hi @BenJule
Thanks very much for working on this.

We have recently fixed the github building issues, including CMake 4.x compatibility.
Could you please check whether this patch is still needed?

@BenJule

BenJule commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @lanewei120 - checked against current master and both changes are already there: deps/CMakeLists.txt now has cmake_minimum_required(VERSION 3.5) ahead of project(), and deps-windows.cmake already widened the MSVC range to LESS 1970 (1950-1969 = VS 18 / v144). So this patch is fully redundant now, closing. Thanks for the fix!

@BenJule BenJule closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants