-
Notifications
You must be signed in to change notification settings - Fork 254
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
[FR] warn user if their cmake_minimum_required setting is incompatible with android #2032
Comments
Because we should not be making policy decisions on your behalf. Any policies we set would change the behavior of your CMakeLists.txt. Presumably your project either doesn't have a https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html says that we could probably add something like: if (CMAKE_MINIMUM_REQUIRED LESS 3.6)
message(FATAL_ERROR "Android requires cmake_minimum_required(3.6) or greater")
endif() That's probably the best we can do. Probably a worthwhile improvement, but doesn't actually fix any bugs (and might break some builds if I'm wrong and there's actually a safe minimum between 3.3 and 3.6), so I'm not going to do that so late in the cycle in r27. We can do that for r28 though. |
(if any of that analysis is wrong, that's the best I can do without a repro case, and that's why we always ask for one, so upload one if you think I'm wrong) |
I had the same error while building
|
Okay, so it's a project that wasn't written for android, and for non-android targets it doesn't require anything newer than 2.8.12, but CMake (for good reasons) doesn't allow per-target minimum versions. That makes sense. I don't think we can do any better than a warning for this case, but definitely the warning would be useful. |
NDK27 requires CMake 3.6 or later ( android/ndk#2032 )
Should fix flakes caused by android/ndk#2032 Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Should fix flakes caused by android/ndk#2032 Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
* vcpkg: bump opus to 1.5.2 Should fix flakes caused by android/ndk#2032 Signed-off-by: Vasyl Gello <vasek.gello@gmail.com> * vcpkg: actually use cached artifacts Signed-off-by: Vasyl Gello <vasek.gello@gmail.com> * Print all vcpkg log files on errors Signed-off-by: Vasyl Gello <vasek.gello@gmail.com> --------- Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
This topic comes up in vcpkg now. |
Description
Trying to build project with new NDK we got the following for each component:
Adding
to the beginning of file ndk/27.0.11902837/build/cmake/flags.cmake solves the problem.
Why it is not set there (https://android.googlesource.com/platform/ndk/+/refs/heads/main/build/cmake/flags.cmake) by default?
P.S.: using $ANDROID_SDK/cmake/3.22.1 gives the same result
Affected versions
r27
Canary version
No response
Host OS
Linux
Host OS version
Ubuntu 20.04
Affected ABIs
arm64-v8a
Build system
CMake
Other build system
No response
minSdkVersion
26
Device API level
No response
The text was updated successfully, but these errors were encountered: