aboutsummaryrefslogtreecommitdiff
path: root/tflite_micro.cmake
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2021-11-26 16:13:58 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-12-02 15:28:43 +0100
commite4f09e559c15439f65f876e0d08c0730ecb0e840 (patch)
treef641f158c5e6d82ea96f02cde65010ba780b23a3 /tflite_micro.cmake
parent02856bdd80f0ed52d09dd2fea450e61eb02372d6 (diff)
downloadethos-u-core-software-e4f09e559c15439f65f876e0d08c0730ecb0e840.tar.gz
Fixing compiler warnings
Updating compiler warnings enabled for TFLu. Fixing compiler warnings reported by Arm Clang and Arm GCC. Change-Id: Iea959a59ea5416326a3014654389af82903c94a3
Diffstat (limited to 'tflite_micro.cmake')
-rw-r--r--tflite_micro.cmake36
1 files changed, 28 insertions, 8 deletions
diff --git a/tflite_micro.cmake b/tflite_micro.cmake
index e01a423..3d02524 100644
--- a/tflite_micro.cmake
+++ b/tflite_micro.cmake
@@ -184,14 +184,34 @@ target_compile_definitions(tflu PUBLIC
$<$<STREQUAL:${TFLU_BUILD_TYPE},"release">:"NDEBUG;TF_LITE_STRIP_ERROR_STRINGS">
$<$<STREQUAL:${TFLU_BUILD_TYPE},"release_with_logs">:"NDEBUG">)
-target_compile_options(tflu PRIVATE
- ${TFLU_OPTIMIZATION_LEVEL}
- -fno-unwind-tables
- -ffunction-sections
- -fdata-sections
- -fmessage-length=0
- -funsigned-char
- "$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti;-fno-exceptions;-fno-threadsafe-statics>")
+target_compile_options(tflu
+ PRIVATE
+ ${TFLU_OPTIMIZATION_LEVEL}
+ -fno-unwind-tables
+ -ffunction-sections
+ -fdata-sections
+ -fmessage-length=0
+ -funsigned-char
+ "$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti;-fno-exceptions;-fno-threadsafe-statics>"
+
+ -Wall
+ -Wextra
+
+ -Wdouble-promotion
+ -Wmissing-field-initializers
+ -Wshadow
+ -Wstrict-aliasing
+ -Wswitch
+ -Wunused-variable
+ -Wunused-function
+ -Wvla
+
+ PUBLIC
+ -Wno-cast-align
+ -Wno-null-dereference
+ -Wno-unused-parameter
+ -Wno-switch-default
+)
# Install libraries and header files
install(TARGETS tflu DESTINATION "lib")