-# 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)
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")