Fixed default args for Android build (#827)

This commit is contained in:
Ilya Lavrenov 2020-06-09 18:02:03 +03:00 committed by GitHub
parent 074266bf73
commit f518fbb971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 12 deletions

View File

@ -66,19 +66,18 @@ function(build_ngraph)
ngraph_set(NGRAPH_ADDRESS_SANITIZER FALSE)
endif ()
ngraph_set(NGRAPH_PYTHON_BUILD_ENABLE FALSE)
if (NOT ANDROID)
if(ENABLE_TESTS)
ngraph_set(NGRAPH_UNIT_TEST_ENABLE TRUE)
ngraph_set(NGRAPH_IE_ENABLE TRUE)
else()
ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
ngraph_set(NGRAPH_IE_ENABLE FALSE)
endif()
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE TRUE)
if(ENABLE_TESTS AND NOT ANDROID)
ngraph_set(NGRAPH_UNIT_TEST_ENABLE TRUE)
ngraph_set(NGRAPH_IE_ENABLE TRUE)
else()
ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
ngraph_set(NGRAPH_TEST_UTIL_ENABLE FALSE)
ngraph_set(NGRAPH_IE_ENABLE FALSE)
endif()
if(NOT ANDROID)
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE TRUE)
else()
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE FALSE)
endif()
ngraph_set(NGRAPH_INTERPRETER_ENABLE TRUE)

View File

@ -29,6 +29,11 @@ list(APPEND CLDNN_LIBS
include(FindPkgConfig)
pkg_search_module(LIBVA QUIET libva)
# TODO: pkg_search_module finds libva not in sysroot
if(ANDROID)
set(LIBVA_FOUND OFF)
endif()
if(LIBVA_FOUND)
list(APPEND CLDNN_LIBS ${LIBVA_LINK_LIBRARIES})
endif()

View File

@ -19,6 +19,7 @@ set(NGRAPH_ONNX_NAMESPACE ngraph_onnx)
set(ONNX_LIBRARIES onnx onnx_proto)
add_subdirectory(runtime)
if(NOT NGRAPH_UNIT_TEST_ENABLE)
message(STATUS "unit tests disabled")
@ -26,8 +27,6 @@ if(NOT NGRAPH_UNIT_TEST_ENABLE)
return()
endif()
add_subdirectory(runtime)
message(STATUS "unit tests enabled")
if(LINUX)