Skip to content

Commit

Permalink
Relax the cmake version for android ndk
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed Nov 19, 2019
1 parent e97b9db commit 1c5cee0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ option(DNN_BUILD_PYTHON "Build Python wrapper for onnx2daq" ON)
option(DNN_USE_MSVC_STATIC_RUNTIME "Link onnx2daq to msvc static runtime" ON)
option(DNN_CMAKE_INSTALL "Export targets in cmake (disable it for ONNXRuntime)" ON)

if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0" AND CMAKE_VERSION VERSION_LESS "3.15.2")
message(FATAL_ERROR "Android NDK is not compatible with CMake 3.15.0 and 3.15.1 (https://gitlab.kitware.com/cmake/cmake/issues/19515), please install another cmake version.")
endif()
endif()

include(cmake/system.cmake)
include(cmake/common.cmake)

Expand All @@ -22,9 +28,6 @@ include(cmake/flatbuffers.cmake)
configure_flatbuffers()

if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15" AND CMAKE_VERSION VERSION_LESS "3.16")
message(FATAL_ERROR "Android NDK is not compatible with CMake 3.15 (https://gitlab.kitware.com/cmake/cmake/issues/19515), please install another cmake version.")
endif()
add_compile_options(-Os)
set (CMAKE_CXX_STANDARD 17)
if (${DNN_READ_ONNX})
Expand Down

0 comments on commit 1c5cee0

Please sign in to comment.