Skip to content

Commit

Permalink
Refuse to build DNNLibrary with cmake 3.15
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed Sep 17, 2019
1 parent 2d48e27 commit 647d4c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ 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)
# Workaround for cmake 3.15, https://gitlab.kitware.com/cmake/cmake/issues/19515.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set (CMAKE_CXX_STANDARD 17)
if (${DNN_READ_ONNX})
include(cmake/onnx.cmake)
configure_onnx()
Expand Down

0 comments on commit 647d4c3

Please sign in to comment.