-
Notifications
You must be signed in to change notification settings - Fork 979
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
Pass ANDROID_ABI & ANDROID_NDK to cmake #4538
Pass ANDROID_ABI & ANDROID_NDK to cmake #4538
Conversation
506bd87
to
b4c12dc
Compare
dc1f80d
to
5e58029
Compare
PR for docs is ready @SSE4 @theodelrieu this is my first PR, maybe you can suggest what can I do to speedup it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable
as identified here: conan-io/conan-docker-tools#107
for instance:
see also: |
@SSE4 agree with you, Currently only I will update it to cover |
379eddf
to
32f6cd6
Compare
For
According to https://android.googlesource.com/platform/ndk.git/+/refs/tags/ndk-r19b/build/cmake/android.toolchain.cmake (latest available NDK r19 at this moment) I have 3 question at this moment:
|
|
@SSE4 thanks I will update PR according your suggestions |
@SSE4 I just checked rest variables, in fact they control CXX & LD flags, so no reason to pass them One more question: should I use |
@CAMOBAP795 I personally think it would be easier to just have same values as android NDK has ( |
32f6cd6
to
70c43f2
Compare
@SSE4 done, code ready for review |
70c43f2
to
79c6ee0
Compare
Looks good to me. About the other CMake variables present in the NDK toolchain file, I do use # Export configurable variables for the try_compile() command.
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
ANDROID_TOOLCHAIN
ANDROID_ABI
ANDROID_PLATFORM
ANDROID_STL
ANDROID_PIE
ANDROID_CPP_FEATURES
ANDROID_ALLOW_UNDEFINED_SYMBOLS
ANDROID_ARM_MODE
ANDROID_ARM_NEON
ANDROID_DISABLE_NO_EXECUTE
ANDROID_DISABLE_RELRO
ANDROID_DISABLE_FORMAT_STRING_CHECKS
ANDROID_CCACHE) |
@SSE4 and why all these new vars doesn't follow the naming of the other Conan-Cmake related stuff? https://docs.conan.io/en/latest/reference/env_vars.html#cmake-related-variables Why are there different? Maybe they shouldn't |
If these variables are not "standard" env vars but "standard" cmake variables, and Conan will use them to know when to inject definitions in the |
They are not "standard" env vars (AFAIK) and they are not "standard" cmake variables, as I said before they are toolchain specific https://android.googlesource.com/platform/ndk/+/master/build/cmake/android.toolchain.cmake So as far as I understood they should not follow the CONAN_CMAKE_ prefix, moreover because most of them can be taken from Conan's profile confing @lasote make sense? |
If they are clearly declared in the NDK cmake toolchain they are "standard" enough.
There is no reason you cannot declare |
Currently, my profile looks like:
@lasote according to your suggestion I should duplicate information which already provided with:
By providing extra |
No, if it works for you only specifying |
I'm talking about the vars that you are reading from the env, of course. |
@lasote, oh, I got your point, totally make sense, I will update PR |
@CAMOBAP795 could you update the branch and introduce the mentioned changes? we will try to open the release branch ASAP. Otherwise I will do it and I will preserve your contribution, of course. |
79c6ee0
to
8ff9a37
Compare
@lasote done |
Thanks! I'm merging this, we will introduce some small tuning described here: #5258 But your contribution will be kept, of course. 😃 |
closes #4537
Changelog: Feature: Pass
ANDROID_ABI
&ANDROID_NDK
to CMakeChangelog: Feature: Created tool to covert arch to abi in Andrid:
tools.to_android_abi()
Docs: conan-io/docs#1102
Checklist
develop
branch, documenting this one.