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 not being detected with latest NDK toolchain #458

Merged
merged 1 commit into from
Jan 20, 2017

Conversation

Gachapen
Copy link
Contributor

When using the NDK 13b toolchain standalone or with CMake, ANDROID is not defined,
but ANDROID is defined instead.

I can't say for sure that is and will always be the case, but it works for me, and I have some unofficial sources: http://stackoverflow.com/a/15335544 and http://markmail.org/message/5ekhfztchs45lz3n#query:+page:1+mid:jfqgzrmwm37uyrt6+state:results

When using the NDK 13b toolchain standalone or with CMake, ANDROID is not defined,
but __ANDROID__ is defined instead.
@foonathan foonathan merged commit bc6af75 into fmtlib:master Jan 20, 2017
@foonathan
Copy link
Contributor

Thanks, merged.

foonathan pushed a commit that referenced this pull request Jun 8, 2017
When using the NDK 13b toolchain standalone or with CMake, ANDROID is not defined,
but __ANDROID__ is defined instead.

(cherry picked from commit bc6af75)
@enh
Copy link

enh commented Feb 5, 2018

Android maintainer here: yes, __ANDROID__ is the correct macro for "you're building for an Android target". you might want to remove the test for ANDROID because that can be set in some surprising cases (such as "you're using an Android toolchain/inside the AOSP build system, but targeting the host").

vitaut added a commit that referenced this pull request Feb 7, 2018
@vitaut
Copy link
Contributor

vitaut commented Feb 7, 2018

Removed the ANDROID check in 867b330. Thanks for clarification, @enh.

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.

4 participants