From dc17f3fca5abba3e2b314c6952fd87dbedfe724f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 21 Jun 2019 14:32:02 +0900 Subject: [PATCH] [tf2tflite] Use TargetRequire_Return (#3910) This commit replaces ensure_required_targets (which is local to tf2tflite) with TargetRequire_Return. Signed-off-by: Jonghyun Park --- contrib/tf2tflite/CMakeLists.txt | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/contrib/tf2tflite/CMakeLists.txt b/contrib/tf2tflite/CMakeLists.txt index 9aa69b7..f0c7730 100644 --- a/contrib/tf2tflite/CMakeLists.txt +++ b/contrib/tf2tflite/CMakeLists.txt @@ -1,15 +1,4 @@ -# NOTE Do NOT use "function". -# -# The "return" inside this helper SHOULD affect this CMake file (not this routine). -# -# TODO Make this helper as a reusable module -macro(ensure_required_targets) - foreach(REQUIRED_TARGET IN ITEMS ${ARGN}) - if(NOT TARGET ${REQUIRED_TARGET}) - return() - endif(NOT TARGET ${REQUIRED_TARGET}) - endforeach(REQUIRED_TARGET) -endmacro(ensure_required_targets) +nncc_include(TargetRequire) # TODO Allow users to force tf2tflite build if(NOT TARGET moco_tf_frontend) @@ -40,7 +29,7 @@ list(APPEND REQUIRED_TARGETS nnkit_randomize_action) list(APPEND REQUIRED_TARGETS nnkit_HDF5_export_action) list(APPEND REQUIRED_TARGETS nnkit_HDF5_import_action) list(APPEND REQUIRED_TARGETS i5diff) -ensure_required_targets(${REQUIRED_TARGETS}) +TargetRequire_Return(${REQUIRED_TARGETS}) message(STATUS "tf2tflite: run tests") -- 2.7.4