Disable nGraph tests if ENABLE_TESTS=OFF (#579)
authorIlya Churaev <ilya.churaev@intel.com>
Tue, 26 May 2020 08:51:47 +0000 (11:51 +0300)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 08:51:47 +0000 (11:51 +0300)
CMakeLists.txt
cmake/features.cmake
inference-engine/cmake/features_ie.cmake

index e06795c..4322f01 100644 (file)
@@ -62,8 +62,13 @@ function(build_ngraph)
     endif ()
     ngraph_set(NGRAPH_PYTHON_BUILD_ENABLE FALSE)
     if (NOT ANDROID)
-        ngraph_set(NGRAPH_UNIT_TEST_ENABLE TRUE)
-        ngraph_set(NGRAPH_IE_ENABLE TRUE)
+        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)
     else()
         ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
index 72a6b94..3ac4305 100644 (file)
@@ -12,6 +12,9 @@ if(X86_64)
 else()
     set(ENABLE_MKL_DNN_DEFAULT OFF)
 endif()
+
+ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF)
+
 ie_option (ENABLE_MKL_DNN "MKL-DNN plugin for inference engine" ${ENABLE_MKL_DNN_DEFAULT})
 
 ie_dependent_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON "WIN32 OR X86_64;NOT APPLE;NOT MINGW" OFF)
index bfdfdd6..8294d96 100644 (file)
@@ -68,8 +68,6 @@ ie_dependent_option (ENABLE_MYRIAD "myriad targeted plugin for inference engine"
 
 ie_dependent_option (ENABLE_MYRIAD_NO_BOOT "myriad plugin will skip device boot" OFF "ENABLE_MYRIAD" OFF)
 
-ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF)
-
 ie_dependent_option (ENABLE_GAPI_TESTS "tests for GAPI kernels" ON "ENABLE_TESTS" OFF)
 
 ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_GAPI_TESTS" OFF)