Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android CI CMake Java JNI error #6284

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

ekilmer
Copy link
Contributor

@ekilmer ekilmer commented Aug 19, 2022

Specifying CMAKE_ANDROID_API is apparently more correct than specifying CMAKE_SYSTEM_VERSION on CMake 3.24 (and earlier versions). Reference is here https://cmake.org/cmake/help/v3.24/manual/cmake-toolchains.7.html#cross-compiling-for-android-with-the-ndk where it describes the CMAKE_SYSTEM_VERSION variable:

If not specified, the value is determined as follows: If the CMAKE_ANDROID_API variable is set, its value is used as the API level."

Passing CI is here for a commit that enabled CI on my branch for these changes https://github.com/ekilmer/z3/actions/runs/2890880110

CMAKE_ANDROID_API will set CMAKE_SYSTEM_VERSION if it's not defined.

Also remove setting CMake variable values that don't affect the ability
to successfully configure in CI.
@NikolajBjorner NikolajBjorner merged commit ea8b118 into Z3Prover:master Aug 19, 2022
@NikolajBjorner
Copy link
Contributor

Thanks for taking a look

@ekilmer ekilmer deleted the fix-android-ci-java branch August 19, 2022 18:47
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.

None yet

2 participants