cmake: sparse: deprecate old sparse support

Deprecate old sparse support as Zephyr now provides a proper
infrastructure for SCA tools. Set ZEPHYR_SCA_VARIANT to sparse if user
is using deprecated way.

This allows to cleanup sparse code in various places and thus have a
cleaner build system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2022-11-30 12:46:38 +01:00 committed by Stephanos Ioannidis
commit 60196ca112
4 changed files with 15 additions and 46 deletions

View file

@ -301,12 +301,6 @@ if(CONFIG_COMPILER_COLOR_DIAGNOSTICS)
zephyr_compile_options($<TARGET_PROPERTY:compiler,diagnostic>)
endif()
if("${SPARSE}" STREQUAL "y")
list(APPEND TOOLCHAIN_C_FLAGS -D__CHECKER__)
# Avoid compiler "attribute directive ignored" warnings
list(APPEND TOOLCHAIN_C_FLAGS -Wno-attributes)
endif()
zephyr_compile_options(
${TOOLCHAIN_C_FLAGS}
)