Imported Upstream version 1.12.0
[platform/core/ml/nnfw.git] / infra / nnfw / cmake / CfgOptionFlags.cmake
1 include(CMakeDependentOption)
2
3 #
4 # Platfor specific configuration
5 # note: this should be placed before default setting for option setting priority
6 #       (platform specific setting have higher priority)
7 #
8 include("cmake/options/options_${TARGET_PLATFORM}.cmake")
9
10 #
11 # Default build configuration for project
12 #
13 option(ENABLE_STRICT_BUILD "Treat warning as error" ON)
14 option(ENABLE_COVERAGE "Build for coverage test" OFF)
15 option(BUILD_EXT_MULTITHREAD "Build external build using multi thread" ON)
16 option(BUILD_ONERT "Build onert" ON)
17 option(BUILD_LOGGING "Build logging runtime" ON)
18 option(BUILD_RUNTIME_NNAPI_TEST "Build Runtime NN API Generated Test" ON)
19 option(BUILD_RUNTIME_NNFW_API_TEST "Build Runtime NNFW API Tests" ON)
20 option(BUILD_TFLITE_RUN "Build tflite-run" ON)
21 option(BUILD_TFLITE_VANILLA_RUN "Build tflite-vanilla-run" OFF)
22 option(BUILD_TFLITE_BENCHMARK_MODEL "Build tflite benchmark model" OFF)
23 option(BUILD_NNAPI_TEST "Build nnapi_test" ON)
24 option(BUILD_NNPACKAGE_RUN "Build nnpackge_run" ON)
25 option(BUILD_TFLITE_LOADER "Build TensorFlow Lite loader" ON)
26 option(BUILD_CIRCLE_LOADER "Build circle loader" ON)
27 option(BUILD_TFLITE_LOADER_TEST_TOOL "Build tflite loader testing tool" ON)
28 option(BUILD_WITH_HDF5 "Build test tool with HDF5 library" ON)
29 option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" ON)
30 option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" ON)
31 option(INSTALL_TEST_SCRIPTS "Install test scripts" ON)
32 #
33 # Default build configuration for contrib
34 #
35 option(BUILD_ANDROID_TFLITE "Enable android support for TensorFlow Lite" OFF)
36 option(BUILD_ANDROID_BENCHMARK_APP "Enable Android Benchmark App" OFF)
37 option(BUILD_BENCHMARK_ACL "Build ARM Compute Library Benchmarks" OFF)
38 option(BUILD_DETECTION_APP "Build detection example app" OFF)
39 option(BUILD_HEAP_TRACE "Build heap trace tool" OFF)
40 option(BUILD_LABS "Build lab projects" OFF)
41 option(BUILD_STYLE_TRANSFER_APP "Build style transfer app" OFF)
42 option(BUILD_TFLITE_TEST "Build tensorflow lite test" OFF)
43 option(BUILD_TFLITE_CLASSIFY_APP "Build tflite_classify app" OFF)
44 option(BUILD_UBEN "Build micro-benchmark (uben) suite" OFF)
45 option(BUILD_MLAPSE "Build mlapse benchmark toolkit" OFF)
46 #
47 # Default build configuration for tools
48 #
49 option(BUILD_KBENCHMARK "Build kernel benchmark tool" OFF)
50 option(BUILD_OPENCL_TOOL "Build OpenCL tool" OFF)
51 option(BUILD_TFLITE_ACCURACY "Build tflite accuracy tool" OFF)
52 #
53 # Default external libraries source download and build configuration
54 #
55 option(DOWNLOAD_TENSORFLOW "Download Tensorflow source" ON)
56 option(DOWNLOAD_ABSEIL "Download Abseil source" ON)
57 option(DOWNLOAD_EIGEN "Download Eigen source" ON)
58 option(DOWNLOAD_FARMHASH "Download farmhash source" ON)
59 option(DOWNLOAD_GEMMLOWP "Download GEMM low precesion library source" ON)
60 option(DOWNLOAD_NEON2SSE "Download NEON2SSE library source" ON)
61 option(DOWNLOAD_FLATBUFFERS "Download FlatBuffers source" ON)
62 option(DOWNLOAD_ARMCOMPUTE "Download ARM Compute source" ON)
63 option(DOWNLOAD_NONIUS "Download nonius source" ON)
64 option(DOWNLOAD_BOOST "Download boost source" OFF)
65 option(DOWNLOAD_RUY "Download ruy source" ON)
66 option(DOWNLOAD_CPUINFO "Download cpuinfo source" ON)
67 option(DOWNLOAD_GTEST "Download Google Test source and build Google Test" ON)
68 option(BUILD_BOOST "Build boost source" OFF)
69 option(BUILD_TENSORFLOW_LITE "Build TensorFlow Lite from the downloaded source" ON)
70 option(BUILD_TENSORFLOW_LITE_2_3_0 "Build TensorFlow Lite 2.3.0 from the downloaded source" OFF)
71 option(BUILD_ARMCOMPUTE "Build ARM Compute from the downloaded source" ON)
72 option(BUILD_RUY "Build ruy library from the downloaded source" ON)
73 option(BUILD_CPUINFO "Build cpuinfo library from the downloaded source" ON)
74 option(PROFILE_RUY "Enable ruy library profiling" OFF)
75 option(DOWNLOAD_XNNPACK "Download xnnpack source" ON)
76 option(BUILD_XNNPACK "Build xnnpack library from the downloaded source" ON)
77 option(DOWNLOAD_PTHREADPOOL "Download pthreadpool source" ON)
78 option(BUILD_PTHREADPOOL "Build pthreadpool library from the source" ON)
79 option(DOWNLOAD_PSIMD "Download psimd source" ON)
80 option(BUILD_PSIMD "Build psimd library from the source" ON)
81 option(DOWNLOAD_FP16 "Download fp16 source" ON)
82 option(BUILD_FP16 "Build fp16 library from the source" ON)
83 option(DOWNLOAD_FXDIV "Download fxdiv source" ON)
84 option(BUILD_FXDIV "Build fxdiv library from the source" ON)
85
86
87 #
88 ## Default sample build configuration
89 #
90 option(BUILD_MINIMAL_SAMPLE "Build minimal app" OFF)