Maratyszcza/NNPACK

Cmake step failing for android build

RuABraun opened this issue · 2 comments

When using cmake 3.6.3 with or without Ninja

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage

When using 3.14.2 there additionally is with Ninja

CMake Error: CMake was unable to find a build program corresponding to "Ninja".

Without Ninja and android

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".

I'm on NDK 20, SDK API level 24. This is how I'm calling it:

cmake .. -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.cmake.toolchain -DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang -DANDROID_ARM_NEON=1

I can compile QNNPACK for android without any problems by the way.

It should be:

-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake

not as in the README

-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.cmake.toolchain

Thank you for reporting this. Fixed in a344d23