Skip to content

Commit

Permalink
cmake: zephyr-package: add message mode
Browse files Browse the repository at this point in the history
Explicitly set the <mode> value to the message printed when including
zephyr modules. The documentation is added to explain why it is
output to stderr, as this has been been subject of multiple PR's
(zephyrproject-rtos#31365,zephyrproject-rtos#43009).

Signed-off-by: Jordan Yates <[email protected]>
  • Loading branch information
Jordan Yates authored and carlescufi committed Mar 23, 2022
1 parent fef56b3 commit 568fb35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions share/zephyr-package/cmake/ZephyrConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ macro(include_boilerplate location)

if(NOT NO_BOILERPLATE)
list(LENGTH Zephyr_FIND_COMPONENTS components_length)
# The module messages are intentionally higher than STATUS to avoid the -- prefix
# and make them more visible to users. This does result in them being output
# to stderr, but that is an implementation detail of cmake.
if(components_length EQUAL 0)
message("Loading Zephyr default modules (${location}).")
message(NOTICE "Loading Zephyr default modules (${location}).")
include(zephyr_default NO_POLICY_SCOPE)
else()
message("Loading Zephyr module(s) (${location}): ${Zephyr_FIND_COMPONENTS}")
message(NOTICE "Loading Zephyr module(s) (${location}): ${Zephyr_FIND_COMPONENTS}")
foreach(component ${Zephyr_FIND_COMPONENTS})
if(${component} MATCHES "^\([^:]*\):\(.*\)$")
string(REPLACE "," ";" SUB_COMPONENTS ${CMAKE_MATCH_2})
Expand Down

0 comments on commit 568fb35

Please sign in to comment.