From 21c06ef92b18212cc5ba566980b61bf3c519594b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=ED=95=9C=EC=A2=85/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 26 Sep 2019 11:44:47 +0900 Subject: [PATCH] [tflite_bencmark] Let users can turn On/Off build (#7750) * [tflite_bencmark] Let users can turn On/Off build Introduce CMake variable `BUILD_TFLITE_BENCHMARK` which is a flag to indicate do the build or not. Signed-off-by: Hanjoung Lee * Update CfgOptionFlags.cmake Signed-off-by: Hanjoung Lee --- infra/nnfw/cmake/CfgOptionFlags.cmake | 1 + tests/tools/tflite_benchmark/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/infra/nnfw/cmake/CfgOptionFlags.cmake b/infra/nnfw/cmake/CfgOptionFlags.cmake index f1342fc..c51138d 100644 --- a/infra/nnfw/cmake/CfgOptionFlags.cmake +++ b/infra/nnfw/cmake/CfgOptionFlags.cmake @@ -21,6 +21,7 @@ CMAKE_DEPENDENT_OPTION(BUILD_RUNTIME_NNAPI_TEST "Build Runtime NN API Generated # Otherwise set BUILD_RUNTIME_NNAPI_TEST as OFF OFF) option(BUILD_TFLITE_RUN "Build tflite-run" ON) +option(BUILD_TFLITE_BENCHMARK "Build tflite benchmark" ON) option(BUILD_TFLITE_BENCHMARK_MODEL "Build tflite benchmark model" OFF) option(BUILD_NNAPI_QUICKCHECK "Build NN API Quickcheck tools" OFF) option(BUILD_TOOLS "Bulid nnfw projects under tools/" ON) diff --git a/tests/tools/tflite_benchmark/CMakeLists.txt b/tests/tools/tflite_benchmark/CMakeLists.txt index ed51861..2536c25 100644 --- a/tests/tools/tflite_benchmark/CMakeLists.txt +++ b/tests/tools/tflite_benchmark/CMakeLists.txt @@ -1,3 +1,7 @@ +if (NOT BUILD_TFLITE_BENCHMARK) + return() +endif(NOT BUILD_TFLITE_BENCHMARK) + list(APPEND SOURCES "src/tflite_benchmark.cc") add_executable(tflite_benchmark ${SOURCES}) -- 2.7.4