summaryrefslogtreecommitdiff
path: root/tests/tools/tflite_benchmark_model/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tools/tflite_benchmark_model/CMakeLists.txt')
-rw-r--r--tests/tools/tflite_benchmark_model/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tools/tflite_benchmark_model/CMakeLists.txt b/tests/tools/tflite_benchmark_model/CMakeLists.txt
new file mode 100644
index 000000000..c48f658c1
--- /dev/null
+++ b/tests/tools/tflite_benchmark_model/CMakeLists.txt
@@ -0,0 +1,18 @@
+if (NOT BUILD_TFLITE_BENCHMARK_MODEL)
+ return()
+endif(NOT BUILD_TFLITE_BENCHMARK_MODEL)
+
+file(GLOB_RECURSE SOURCES "*.cc")
+
+nnfw_find_package(TensorFlowSource REQUIRED)
+set(TENSORFLOW_LITE_BASE "${TensorFlowSource_DIR}/tensorflow/contrib/lite")
+list(APPEND SOURCES "${TENSORFLOW_LITE_BASE}/tools/benchmark/benchmark_main.cc"
+ "${TENSORFLOW_LITE_BASE}/tools/benchmark/benchmark_model.cc"
+ "${TENSORFLOW_LITE_BASE}/tools/benchmark/benchmark_params.cc"
+ "${TENSORFLOW_LITE_BASE}/tools/benchmark/command_line_flags.cc")
+
+add_executable(tflite_benchmark_model ${SOURCES})
+target_compile_definitions(tflite_benchmark_model PUBLIC "TFLITE_PROFILING_ENABLED")
+target_link_libraries(tflite_benchmark_model nnfw_lib_misc nnfw_lib_tflite nnfw_lib_profiling)
+target_link_libraries(tflite_benchmark_model tensorflow-lite ${LIB_PTHREAD} dl)
+install(TARGETS tflite_benchmark_model DESTINATION bin)