x64 host detection for android.toolchain.cmake on windows (Patch #3110)
Description
Following line:
- detect current host platform
if( NOT DEFINED ANDROID_NDK_HOST_X64 AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
does not correctly detects x64 on 64bit Windows where CMAKE_HOST_SYSTEM_PROCESSOR is equal to "x86". It is not a big trouble but lower in code we may find the following lines:
if( NOT ANDROID_NDK_HOST_X64 )
set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
endif()
So in situation when host system is Windows and ANDROID_NDK_HOST_X64 is not set by user android.toolchain.cmake replaces correct x64 search path with x32 bit path.
Possible solutions:- Do not overwrite ANDROID_NDK_HOST_SYSTEM_NAME (just erase the check) and try to search in it first (nothing bad shall happen in this case)
- Somehow fix host detection (cmake bug?)
Tested on CMake 2.8.6 with android-ndk-r8e-windows-x86_64
History
Updated by Kirill Kornyakov over 11 years ago
- Assignee changed from Andrey Kamaev to Alexander Smorkalov
- Category changed from build/install to android
- Difficulty changed from Easy to Medium
Updated by Alexander Smorkalov over 11 years ago
- Assignee changed from Alexander Smorkalov to Andrey Pavlenko
Updated by Alexander Smorkalov over 11 years ago
It looks like cmake bug. I check your issue with cmake 2.8.11 and it works right. Cmake detects processor as AMD64.
It is not OpenCV issue. I cancel the ticket.
- Assignee changed from Andrey Pavlenko to Alexander Smorkalov
- Status changed from New to Cancelled