Skip to content

Commit 87b3659

Browse files
ceolinnashif
authored andcommitted
tf-m: build: Treat warnings as errors
Starting in TF-M 2.2.0 there is a build option to treat warnings as errors. Lets use it. Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
1 parent 0b1cff2 commit 87b3659

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ if (CONFIG_BUILD_WITH_TFM)
2626
endif()
2727
endif()
2828

29+
# Treat any warning as error
30+
if (CONFIG_COMPILER_WARNINGS_AS_ERRORS)
31+
list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_WARNINGS_ARE_ERRORS:BOOL=ON)
32+
endif()
33+
2934
if (CONFIG_TFM_SFN)
3035
list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_SPM_BACKEND="SFN")
3136
else() # CONFIG_TFM_IPC

0 commit comments

Comments
 (0)