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 <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2018-07-31 16:12:31 +02:00 committed by Anas Nashif
parent d08a212ea2
commit 9c93e8e87b
2 changed files with 20 additions and 0 deletions

3
.gitignore vendored
View File

@ -40,3 +40,6 @@ tags
.xxproject
.envrc
.vscode
# Disables the warning about the changed behavior for Kconfig defaults
hide-defaults-note

View File

@ -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()