cmake: add a mechanism for deprecating modules

We currently have mechanisms for deprecating both boards and SoCs.
However, we lack one for deprecating modules. This is inconvenient,
because we would like to do exactly that.

Handle this in a simple way by adding a new CMake file in the modules
directory which is responsible for warning the user about any
deprecated modules they may be using. See the source code comments for
more details about the approach.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2022-05-26 14:00:45 -07:00 committed by Marti Bolivar
commit dcec8d028a
2 changed files with 15 additions and 0 deletions

View file

@ -1824,6 +1824,8 @@ if(CONFIG_SOC_DEPRECATED_RELEASE)
)
endif()
include(modules/deprecation_warnings.cmake)
# In CMake projects, 'CMAKE_BUILD_TYPE' usually determines the
# optimization flag, but in Zephyr it is determined through
# Kconfig. Here we give a warning when there is a mismatch between the