From: 오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 4 Dec 2018 10:39:18 +0000 (+0900) Subject: Revise build flags for contrib (#3855) X-Git-Tag: 0.3~221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7050f92c1f738097f715878bf467a70d7111aa24;p=platform%2Fcore%2Fml%2Fnnfw.git Revise build flags for contrib (#3855) Revise build flags order for contrib in CfgOptionFlags.cmake Introduce build flag for tf_test Use build flag BUILD_LAB for opencl_test build Change build flags' default for contrib off Signed-off-by: Hyeongseok Oh --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fe56952..b24100e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,12 +77,12 @@ else("${TARGET_OS}" STREQUAL "android") # General case (non-android build) if(NOT OBS_BUILD) add_subdirectory(externals) add_subdirectory(tools) - add_subdirectory(contrib) else(NOT OBS_BUILD) add_subdirectory(tools/tflite_benchmark) add_subdirectory(tools/nnapi_test) endif(NOT OBS_BUILD) + add_subdirectory(contrib) add_subdirectory(libs) add_subdirectory(runtimes) diff --git a/cmake/CfgOptionFlags.cmake b/cmake/CfgOptionFlags.cmake index 1668f78..7f85a16 100644 --- a/cmake/CfgOptionFlags.cmake +++ b/cmake/CfgOptionFlags.cmake @@ -2,13 +2,17 @@ # Configuration flags # option(BUILD_PURE_ARM_COMPUTE "Build pure_arm_compute runtime" ON) -option(BUILD_BENCHMARK_ACL "Build ARM Compute Library Benchmarks" OFF) option(BUILD_NEURUN "Build neurun" OFF) #if implementation is done, it would replace nn runtime. -option(BUILD_LABS "Build lab projects" ON) option(BUILD_ANDROID_NN_RUNTIME_TEST "Build Android NN Runtime Test" ON) -option(BUILD_DETECTION_APP "Build detection example app" OFF) -option(BUILD_NNAPI_QUICKCHECK "Build NN API Quickcheck tools" OFF) option(BUILD_TFLITE_BENCHMARK_MODEL "Build tflite benchmark model" OFF) +option(BUILD_NNAPI_QUICKCHECK "Build NN API Quickcheck tools" OFF) +# +# Configuration flags for contrib +# +option(BUILD_BENCHMARK_ACL "Build ARM Compute Library Benchmarks" OFF) +option(BUILD_DETECTION_APP "Build detection example app" OFF) +option(BUILD_LABS "Build lab projects" OFF) +option(BUILD_TF_TEST "Build tensorflow test" OFF) option(BUILD_TFLITE_CLASSIFY_APP "Build tflite_classify app" OFF) if("${TARGET_ARCH}" STREQUAL "armv7l" AND NOT "${TARGET_OS}" STREQUAL "tizen") diff --git a/contrib/opencl_test/CMakeLists.txt b/contrib/opencl_test/CMakeLists.txt index 5e99fa0..81b6e72 100644 --- a/contrib/opencl_test/CMakeLists.txt +++ b/contrib/opencl_test/CMakeLists.txt @@ -1,3 +1,7 @@ +if(NOT BUILD_LABS) + return() +endif(NOT BUILD_LABS) + if(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") return() endif(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") diff --git a/contrib/tf_test/CMakeLists.txt b/contrib/tf_test/CMakeLists.txt index 91616cc..406c0bc 100644 --- a/contrib/tf_test/CMakeLists.txt +++ b/contrib/tf_test/CMakeLists.txt @@ -1,3 +1,7 @@ +if(NOT BUILD_TF_TEST) + return() +endif(NOT BUILD_TF_TEST) + nnfw_find_package(Tensorflow QUIET) if(NOT Tensorflow_FOUND)