diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-11-23 17:19:52 +0000 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-11-23 17:19:52 +0000 |
commit | b59ba684aef4bef16262a1825e787a55fc992f0d (patch) | |
tree | 389e667ef3132727386e0800c0a63d676693185f /scripts/cmake/tensorflow.cmake | |
parent | 37926c819f77a6fe9e3ae913486ac6fc78bd2bd0 (diff) | |
download | ml-embedded-evaluation-kit-b59ba684aef4bef16262a1825e787a55fc992f0d.tar.gz |
MLECO-1935: All common CMake user options consolidated.
For easier look up and maintenance, all common CMake user options
have been consolidated in one CMake file.
NOTE: the individual use case specific options are still within
the correspoinding use case CMake files.
Change-Id: Id887f7b2c763f4d3eb997d997cf466684d0089b6
Diffstat (limited to 'scripts/cmake/tensorflow.cmake')
-rw-r--r-- | scripts/cmake/tensorflow.cmake | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/scripts/cmake/tensorflow.cmake b/scripts/cmake/tensorflow.cmake index 60f191f..8ebac28 100644 --- a/scripts/cmake/tensorflow.cmake +++ b/scripts/cmake/tensorflow.cmake @@ -19,30 +19,16 @@ include(ProcessorCount) ProcessorCount(J) if (CMAKE_BUILD_TYPE STREQUAL Debug) - set(TENSORFLOW_LITE_MICRO_DEFAULT_BUILD_TYPE "debug") set(TENSORFLOW_LITE_MICRO_CORE_OPTIMIZATION_LEVEL "-O0") set(TENSORFLOW_LITE_MICRO_KERNEL_OPTIMIZATION_LEVEL "-O0") elseif (CMAKE_BUILD_TYPE STREQUAL Release) - set(TENSORFLOW_LITE_MICRO_DEFAULT_BUILD_TYPE "release_with_logs") set(TENSORFLOW_LITE_MICRO_CORE_OPTIMIZATION_LEVEL "-O3") set(TENSORFLOW_LITE_MICRO_KERNEL_OPTIMIZATION_LEVEL "-O3") -elseif (NOT DEFINED TENSORFLOW_LITE_MICRO_BUILD_TYPE) - message(WARNING "TENSORFLOW_LITE_MICRO_BUILD_TYPE is not set.") - message(FATAL_ERROR "Build type ${CMAKE_BUILD_TYPE} does not have a corresponding " - "default to set TensorFlow build type") endif() -USER_OPTION(TENSORFLOW_LITE_MICRO_BUILD_TYPE "TensorFlow Lite Mirco build type (release/debug etc.)" - ${TENSORFLOW_LITE_MICRO_DEFAULT_BUILD_TYPE} - STRING) - -USER_OPTION(TENSORFLOW_LITE_MICRO_CLEAN_DOWNLOADS "Select if TPIP downloads should be cleaned before each build." - OFF - BOOL) - -USER_OPTION(TENSORFLOW_LITE_MICRO_CLEAN_BUILD "Select if clean target should be added to a list of targets" - ON - BOOL) +assert_defined(TENSORFLOW_LITE_MICRO_BUILD_TYPE) +assert_defined(TENSORFLOW_LITE_MICRO_CLEAN_DOWNLOADS) +assert_defined(TENSORFLOW_LITE_MICRO_CLEAN_BUILD) if (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") set(TENSORFLOW_LITE_MICRO_TOOLCHAIN "armclang") |