Skip to content

Commit

Permalink
Kconfig: Have CMake print a note about the changed 'default' behavior
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ulfalizer authored and nashif committed Aug 10, 2018
1 parent d08a212 commit 9c93e8e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ tags
.xxproject
.envrc
.vscode

# Disables the warning about the changed behavior for Kconfig defaults
hide-defaults-note
17 changes: 17 additions & 0 deletions cmake/app/boilerplate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 9c93e8e

Please sign in to comment.