Move cmake options (#4841)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 25 Mar 2019 05:07:42 +0000 (14:07 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Mon, 25 Mar 2019 05:07:42 +0000 (14:07 +0900)
Move cmake options for build and download into cmake/CfgOptionFlgs.cmake

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
CMakeLists.txt
cmake/CfgOptionFlags.cmake

index 18b7ae9..9a58583 100644 (file)
@@ -48,35 +48,6 @@ include("cmake/CfgOptionFlags.cmake")
 #   TARGET_ARCH: target architecture string for cross building
 #   TARGET_OS: target os string for cross building
 
-# Download configuration
-option(DOWNLOAD_TENSORFLOW "Download Tensorflow source" ON)
-option(DOWNLOAD_ABSL "Download Absl source" ON)
-option(DOWNLOAD_EIGEN "Download Eigen source" ON)
-option(DOWNLOAD_FARMHASH "Download farmhash source" ON)
-option(DOWNLOAD_GEMMLOWP "Download GEMM low precesion library source" ON)
-option(DOWNLOAD_NEON2SSE "Download NEON2SSE library source" ON)
-option(DOWNLOAD_FLATBUFFERS "Download FlatBuffers source" ON)
-option(BUILD_TENSORFLOW_LITE "Build TensorFlow Lite from the downloaded source" ON)
-option(DOWNLOAD_ARMCOMPUTE "Download ARM Compute source" ON)
-CMAKE_DEPENDENT_OPTION(BUILD_ARMCOMPUTE "Build ARM Compute from the downloaded source"
-                       # Enable ARMCompute build if the target architecture is aarch
-                       ON "TARGET_IS_ARMARCH"
-                       # Disable ARMCompute build otherwise
-                       OFF)
-option(DOWNLOAD_NONIUS "Download nonius source" ON)
-option(DOWNLOAD_BOOST "Download boost source" OFF)
-option(BUILD_BOOST "Build boost source" OFF)
-
-# Project configuration
-option(BUILD_TOOLS "Bulid nnfw projects under tools/" ON)
-CMAKE_DEPENDENT_OPTION(BUILD_ANDROID_TFLITE "Enable android support for TensorFlow Lite"
-                       # Enable android support for android build
-                       ON "${TARGET_OS} STREQUAL android"
-                       # Disable android support otherwise
-                       OFF)
-
-# GTest support
-option(BUILD_GTEST "Download and build Google Test" ON)
 nnfw_find_package(GTest QUIET)
 
 nnfw_include(ExtendCMakeFunction)
index e197f24..8c31e3f 100644 (file)
@@ -1,7 +1,7 @@
 include(CMakeDependentOption)
 
 #
-# Configuration flags
+# Build configuration for project
 #
 option(BUILD_EXT_MULTITHREAD "Build external build using multi thread" ON)
 CMAKE_DEPENDENT_OPTION(BUILD_PURE_ARM_COMPUTE "Build pure_arm_compute runtime"
@@ -21,8 +21,14 @@ CMAKE_DEPENDENT_OPTION(BUILD_RUNTIME_NNAPI_TEST "Build Runtime NN API Generated
 option(BUILD_TFLITE_RUN "Build tflite-run" 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)
+CMAKE_DEPENDENT_OPTION(BUILD_ANDROID_TFLITE "Enable android support for TensorFlow Lite"
+                       # Enable android support for android build
+                       ON "${TARGET_OS} STREQUAL android"
+                       # Disable android support otherwise
+                       OFF)
 #
-# Configuration flags for contrib
+# Build configuration for contrib
 #
 option(BUILD_BENCHMARK_ACL "Build ARM Compute Library Benchmarks" OFF)
 option(BUILD_DETECTION_APP "Build detection example app" OFF)
@@ -30,3 +36,27 @@ option(BUILD_LABS "Build lab projects" OFF)
 option(BUILD_TFLITE_TEST "Build tensorflow lite test" OFF)
 option(BUILD_TFLITE_CLASSIFY_APP "Build tflite_classify app" OFF)
 option(BUILD_UBEN "Build micro-benchmark (uben) suite" OFF)
+#
+# Download configuration
+#
+option(DOWNLOAD_TENSORFLOW "Download Tensorflow source" ON)
+option(DOWNLOAD_ABSL "Download Absl source" ON)
+option(DOWNLOAD_EIGEN "Download Eigen source" ON)
+option(DOWNLOAD_FARMHASH "Download farmhash source" ON)
+option(DOWNLOAD_GEMMLOWP "Download GEMM low precesion library source" ON)
+option(DOWNLOAD_NEON2SSE "Download NEON2SSE library source" ON)
+option(DOWNLOAD_FLATBUFFERS "Download FlatBuffers source" ON)
+option(BUILD_TENSORFLOW_LITE "Build TensorFlow Lite from the downloaded source" ON)
+option(DOWNLOAD_ARMCOMPUTE "Download ARM Compute source" ON)
+CMAKE_DEPENDENT_OPTION(BUILD_ARMCOMPUTE "Build ARM Compute from the downloaded source"
+                       # Enable ARMCompute build if the target architecture is aarch
+                       ON "TARGET_IS_ARMARCH"
+                       # Disable ARMCompute build otherwise
+                       OFF)
+option(DOWNLOAD_NONIUS "Download nonius source" ON)
+option(DOWNLOAD_BOOST "Download boost source" OFF)
+option(BUILD_BOOST "Build boost source" OFF)
+#
+# GTest support
+#
+option(BUILD_GTEST "Download and build Google Test" ON)