Skip to content

Conversation

Hitesh-ed
Copy link

@Hitesh-ed Hitesh-ed commented Oct 16, 2025

Issue:
CMake 4.x fails to configure the SentencePiece dependency because its CMakeLists.txt declares cmake_minimum_required(VERSION 3.1), which is no longer compatible (it has to be atleaset 3.5 when using latest Cmake 4.x for build).

Solution:
Adding the following cache variable in CMakePresets.json to enforce modern policies automatically:

"cacheVariables": {
  "CMAKE_POLICY_VERSION_MINIMUM": "3.5"
}

# Pretends old CMake minimums below 3.5 are OK (fixes SentencePiece 3.1 issue automatically)

This ensures all developers can run "cmake --preset windows" without hitting legacy compatibility or deprecation issues.

Adding the following cache variable in the CMakePresets.json to enforce modern policies automatically

This ensures all developers can run cmake --preset windows without hitting legacy compatibility or deprecation issues.
@jan-wassenberg
Copy link
Member

Nice, thanks for adding. We are only able to accept changes to the dev branch, would you please retarget the PR?

@Hitesh-ed Hitesh-ed changed the base branch from main to dev October 16, 2025 14:46
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.

2 participants