From 844eedd5f34f0081c959687a29e72bac196c8b20 Mon Sep 17 00:00:00 2001 From: Liu Yiqun Date: Wed, 29 Mar 2017 19:29:37 +0800 Subject: [PATCH] Add the check of Android API level which must not be lower than 21. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c74f0ac61..4e5c8a8dc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,10 @@ if(NOT CMAKE_BUILD_TYPE) endif() if(ANDROID) + if(${CMAKE_SYSTEM_VERSION} VERSION_LESS "21") + message(FATAL_ERROR "Unsupport standalone toolchains with Android API level lower than 21") + endif() + set(WITH_GPU OFF CACHE STRING "Disable GPU when cross-compiling for Android" FORCE) set(WITH_AVX OFF CACHE STRING -- GitLab