450aa21ab1a8a9b8548879cc3209cd39334c80f8
[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 CMAKE_DEPENDENT_OPTION(BUILD_RUNTIME_NNAPI_TEST "Build Runtime NN API Generated Test"
19                        # Set BUILD_RUNTIME_NNAPI_TEST as ON
20                        #   if CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.2
21                        ON "CMAKE_COMPILER_IS_GNUCC;NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.2"
22                        # Otherwise set BUILD_RUNTIME_NNAPI_TEST as OFF
23                        OFF)
24 option(BUILD_RUNTIME_NNFW_API_TEST "Build Runtime NNFW API Tests" ON)
25 option(BUILD_TFLITE_RUN "Build tflite-run" ON)
26 option(BUILD_TFLITE_VANILLA_RUN "Build tflite-vanilla-run" OFF)
27 option(BUILD_TFLITE_BENCHMARK_MODEL "Build tflite benchmark model" OFF)
28 option(BUILD_NNAPI_TEST "Build nnapi_test" ON)
29 option(BUILD_NNPACKAGE_RUN "Build nnpackge_run" ON)
30 option(BUILD_TFLITE_LOADER "Build TensorFlow Lite loader" ON)
31 option(BUILD_CIRCLE_LOADER "Build circle loader" ON)
32 option(BUILD_TFLITE_LOADER_TEST_TOOL "Build tflite loader testing tool" ON)
33 option(BUILD_WITH_HDF5 "Build test tool with HDF5 library" ON)
34 option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" ON)
35 option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" ON)
36 option(INSTALL_TEST_SCRIPTS "Install test scripts" ON)
37 #
38 # Default build configuration for contrib
39 #
40 option(BUILD_ANDROID_TFLITE "Enable android support for TensorFlow Lite" OFF)
41 option(BUILD_ANDROID_BENCHMARK_APP "Enable Android Benchmark App" OFF)
42 option(BUILD_BENCHMARK_ACL "Build ARM Compute Library Benchmarks" OFF)
43 option(BUILD_DETECTION_APP "Build detection example app" OFF)
44 option(BUILD_HEAP_TRACE "Build heap trace tool" OFF)
45 option(BUILD_LABS "Build lab projects" OFF)
46 option(BUILD_STYLE_TRANSFER_APP "Build style transfer app" OFF)
47 option(BUILD_TFLITE_TEST "Build tensorflow lite test" OFF)
48 option(BUILD_TFLITE_CLASSIFY_APP "Build tflite_classify app" OFF)
49 option(BUILD_UBEN "Build micro-benchmark (uben) suite" OFF)
50 option(BUILD_MLAPSE "Build mlapse benchmark toolkit" OFF)
51 #
52 # Default build configuration for tools
53 #
54 option(BUILD_KBENCHMARK "Build kernel benchmark tool" OFF)
55 option(BUILD_OPENCL_TOOL "Build OpenCL tool" OFF)
56 option(BUILD_NNAPI_QUICKCHECK "Build NN API Quickcheck tools" OFF)
57 option(BUILD_TFLITE_ACCURACY "Build tflite accuracy tool" OFF)
58 #
59 # Default external libraries source download and build configuration
60 #
61 option(DOWNLOAD_TENSORFLOW "Download Tensorflow source" ON)
62 option(DOWNLOAD_ABSEIL "Download Abseil source" ON)
63 option(DOWNLOAD_EIGEN "Download Eigen source" ON)
64 option(DOWNLOAD_FARMHASH "Download farmhash source" ON)
65 option(DOWNLOAD_GEMMLOWP "Download GEMM low precesion library source" ON)
66 option(DOWNLOAD_NEON2SSE "Download NEON2SSE library source" ON)
67 option(DOWNLOAD_FLATBUFFERS "Download FlatBuffers source" ON)
68 option(DOWNLOAD_ARMCOMPUTE "Download ARM Compute source" ON)
69 option(DOWNLOAD_NONIUS "Download nonius source" ON)
70 option(DOWNLOAD_BOOST "Download boost source" OFF)
71 option(DOWNLOAD_RUY "Download ruy source" ON)
72 option(DOWNLOAD_CPUINFO "Download cpuinfo source" ON)
73 option(DOWNLOAD_GTEST "Download Google Test source and build Google Test" ON)
74 option(BUILD_BOOST "Build boost source" OFF)
75 option(BUILD_TENSORFLOW_LITE "Build TensorFlow Lite from the downloaded source" ON)
76 option(BUILD_TENSORFLOW_LITE_2_3_0 "Build TensorFlow Lite 2.3.0 from the downloaded source" OFF)
77 option(BUILD_ARMCOMPUTE "Build ARM Compute from the downloaded source" ON)
78 option(BUILD_RUY "Build ruy library from the downloaded source" ON)
79 option(BUILD_CPUINFO "Build cpuinfo library from the downloaded source" ON)
80 option(PROFILE_RUY "Enable ruy library profiling" OFF)
81
82 #
83 ## Default sample build configuration
84 #
85 option(BUILD_MINIMAL_SAMPLE "Build minimal app" OFF)