From b0f7314689070b7dc8ba8b2f3fe65a0ab9726923 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9C=A4=ED=98=84=EC=8B=9D/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 7 May 2019 12:18:21 +0900 Subject: [PATCH] [nnkit/moco/tf] Make cmake work only when Tensorflow is found (#3405) This commits makes cmake builds nnkit/moco/tf only when TF is found Signed-off-by: Hyun Sik Yoon --- contrib/nnkit/libs/support/moco/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/nnkit/libs/support/moco/CMakeLists.txt b/contrib/nnkit/libs/support/moco/CMakeLists.txt index fdb6abe..2b3c19c 100644 --- a/contrib/nnkit/libs/support/moco/CMakeLists.txt +++ b/contrib/nnkit/libs/support/moco/CMakeLists.txt @@ -1,4 +1,10 @@ # backend for moco TF +nncc_find_package(TensorFlow QUIET) + +if(NOT TensorFlow_FOUND) + return() +endif(NOT TensorFlow_FOUND) + file(GLOB_RECURSE TF_SOURCES "tf/src/*.cpp") add_library(nnkit_support_moco_tf STATIC ${TF_SOURCES}) -- 2.7.4