Build: Added option to treat warnings as errors

Useful for CI.

Change-Id: I68b5acc949de69f1f7fb502bdc8efbbb659c3155
Signed-off-by: Bohdan Hunko <Bohdan.Hunko@infineon.com>
diff --git a/config/config_base.cmake b/config/config_base.cmake
index 591dd6b..05a21f9 100644
--- a/config/config_base.cmake
+++ b/config/config_base.cmake
@@ -53,6 +53,8 @@
 set(CODE_SHARING_OUTPUT_FILE_SUFFIX     "_shared_symbols.axf" CACHE STRING "Suffix to use for code-sharing output files")
 set(CODE_SHARING_INPUT_FILE_SUFFIX      "_shared_symbols.axf" CACHE STRING "Suffix to use for code-sharing input files")
 
+set(CONFIG_TFM_WARNINGS_ARE_ERRORS      OFF         CACHE BOOL      "Whether to treat warnings as errors")
+
 ####################################################################################################
 # These configurations below are also referred by Kconfig configuration system,
 # together with TF-M Header File Config System options.