From 9c93e8e87bede05801b08a43f05e50d43a810d47 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 31 Jul 2018 16:12:31 +0200 Subject: [PATCH] Kconfig: Have CMake print a note about the changed 'default' behavior Always print the note to make sure it isn't missed, but make it easy to disable (by creating an empty file). The note will be removed later. Signed-off-by: Ulf Magnusson --- .gitignore | 3 +++ cmake/app/boilerplate.cmake | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.gitignore b/.gitignore index a54b77b1c53..e984307a3a8 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,6 @@ tags .xxproject .envrc .vscode + +# Disables the warning about the changed behavior for Kconfig defaults +hide-defaults-note diff --git a/cmake/app/boilerplate.cmake b/cmake/app/boilerplate.cmake index 9e166d65f31..7dd271e36a2 100644 --- a/cmake/app/boilerplate.cmake +++ b/cmake/app/boilerplate.cmake @@ -322,3 +322,20 @@ foreach(boilerplate_lib ${ZEPHYR_INTERFACE_LIBS_PROPERTY}) ${boilerplate_lib} ) endforeach() + + +if(NOT EXISTS ${ZEPHYR_BASE}/hide-defaults-note) + message(STATUS "\n\ +*******************************\n\ +*** NOTE TO KCONFIG AUTHORS ***\n\ +*******************************\n\ +\n\ +The behavior of Kconfig 'default' properties in Zephyr has changed. The \n\ +earliest default with a satisfied condition is now used, instead of the \n\ +last one. This is standard Kconfig behavior.\n\ +\n\ +See http://docs.zephyrproject.org/porting/board_porting.html#old-zephyr-kconfig-behavior-for-defaults.\n\ +\n\ +To get rid of this note, create a file called 'hide-defaults-note' in the \n\ +Zephyr root directory. An empty file is fine.") +endif()