From daf026185aa9e569963f49562d8a178bd9315404 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ivan=20Vagin/AI=20Tools=20Lab=20/SRR/Engineer/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 15 May 2019 12:14:32 +0300 Subject: [PATCH] [nnkit/moco/tf] Build moco_test_tf only when TensorFlow is found (#3465) Build moco_test_tf only when TensorFlow is found Signed-off-by: Ivan Vagin --- contrib/moco/test/tf/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/moco/test/tf/CMakeLists.txt b/contrib/moco/test/tf/CMakeLists.txt index 1dcc5c6..c0d72f4 100644 --- a/contrib/moco/test/tf/CMakeLists.txt +++ b/contrib/moco/test/tf/CMakeLists.txt @@ -57,6 +57,12 @@ foreach(PBTXTFILE IN ITEMS ${PBTXTFILES}) endforeach(PBTXTFILE) +nncc_find_package(TensorFlow QUIET) +if(NOT TensorFlow_FOUND) + message(STATUS "moco: Skip adding test as TensorFlow is not found") + return() +endif(NOT TensorFlow_FOUND) + # Run tests add_test(NAME moco_test_tf COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/runall" -- 2.7.4