Skip to content
Commit cb690ec5 authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Stephanos Ioannidis
Browse files

cmake: implement build infrastructure for supporting SCA tools.



Static code analyser (SCA) tools are important in software development.

CMake offers built-in support for some tools, such as cppcheck and
clang-tidy.

Other tools, such as sparse, are not directly supported.

This commit provides a uniform way for users to specify a supported
SCA using `ZEPHYR_SCA_VARIANT=<tool>` which is consistent with how
toolchains are specified.
ZEPHYR_SCA_VARIANT can be set using `-D` or in environment.

Support for an SCA tool is done in `cmake/sca/<tool>/sca.cmake`.
SCA_ROOT can be used to specify additional search paths when looking up
implementation for a tool. SCA_ROOT can also be specified in
`zephyr/module.yml` as setting. This makes it possible to provide SCA
tool implementation as part of a Zephyr module.

Signed-off-by: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent ac951023
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment