Skip to content

Commit 1c5cee0

Browse files
committed
Relax the cmake version for android ndk
1 parent e97b9db commit 1c5cee0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ option(DNN_BUILD_PYTHON "Build Python wrapper for onnx2daq" ON)
99
option(DNN_USE_MSVC_STATIC_RUNTIME "Link onnx2daq to msvc static runtime" ON)
1010
option(DNN_CMAKE_INSTALL "Export targets in cmake (disable it for ONNXRuntime)" ON)
1111

12+
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
13+
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0" AND CMAKE_VERSION VERSION_LESS "3.15.2")
14+
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.")
15+
endif()
16+
endif()
17+
1218
include(cmake/system.cmake)
1319
include(cmake/common.cmake)
1420

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

2430
if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
25-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15" AND CMAKE_VERSION VERSION_LESS "3.16")
26-
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.")
27-
endif()
2831
add_compile_options(-Os)
2932
set (CMAKE_CXX_STANDARD 17)
3033
if (${DNN_READ_ONNX})

0 commit comments

Comments
 (0)