From f518fbb971a6a7c12afed3d04b7f912e57a8edf5 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 9 Jun 2020 18:02:03 +0300 Subject: [PATCH] Fixed default args for Android build (#827) --- CMakeLists.txt | 19 +++++++++---------- .../tests_deprecated/functional/cldnn/CMakeLists.txt | 5 +++++ ngraph/test/CMakeLists.txt | 3 +-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f981ed..54fdc35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt b/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt index 76302d4..efbc266 100644 --- a/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt @@ -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() diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 32793f6..c123e0d 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -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) -- 2.7.4