diff --git a/CMakeLists.txt b/CMakeLists.txt index 656e0d3e71d..3406c0acc60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/modules/deprecation_warnings.cmake b/modules/deprecation_warnings.cmake new file mode 100644 index 00000000000..4ed70222f78 --- /dev/null +++ b/modules/deprecation_warnings.cmake @@ -0,0 +1,13 @@ +# Copyright 2022 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is included to warn the user about any deprecated modules +# they are using. To create a warning, follow the pattern: +# +# if(CONFIG_FOO) +# message(WARNING "The foo module is deprecated. ") +# endif() +# +# This is done in a separate CMake file because the modules.cmake file +# in this same directory is evaluated before Kconfig runs. +