Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CMake 4.0 removed compatibility with
cmake_minimum_required(VERSION < 3.5)and now aborts theconfigure step with:
core/src/main/cpp/CMakeLists.txtstill requestsVERSION 3.0, so any local build that ends upusing a CMake >= 4.0 (for example the CMake shipped with a MinGW/MSYS2 toolchain, or a CMake
selected through
cmake.dirinlocal.properties) fails before anything is compiled. CI is notaffected because it uses the SDK's CMake 3.22.1 — which accepts
3.5just as well.Change
Nothing in this file depends on policies introduced after 3.5 (
execute_process,configure_file,string(TIMESTAMP),list(GET),add_library,target_link_libraries), so the bump only widensthe accepted range at the top: CMake 4.x works, and CMake >= 3.5 keeps working.
(If touching this file is undesirable, the equivalent workaround is to pass
-DCMAKE_POLICY_VERSION_MINIMUM=3.5fromcore/build.gradle.kts'sexternalNativeBuild.cmakearguments.)
Verification
The same change was part of a fork build of
app:assembleAlphaReleaseon theBuild Debugworkflow (which uses the SDK CMake 3.22.1), and the native
bridgetarget configured and linkedsuccessfully, all four ABIs:
https://github.com/Code-0-0/ClashMetaForAndroid/actions/runs/35441174195