Fixed default args for Android build (#827)
authorIlya Lavrenov <ilya.lavrenov@intel.com>
Tue, 9 Jun 2020 15:02:03 +0000 (18:02 +0300)
committerGitHub <noreply@github.com>
Tue, 9 Jun 2020 15:02:03 +0000 (18:02 +0300)
CMakeLists.txt
inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt
ngraph/test/CMakeLists.txt

index 1f981ed..54fdc35 100644 (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)
index 76302d4..efbc266 100644 (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()
index 32793f6..c123e0d 100644 (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)