build: clean up west build

The header printed at the beginning of every west build is kind of
annoying. Let's remove it and just print the application source
directory at cmake time instead. The build directory and board are
already printed there, anyway, and that's all IDE users will see.

Let's clean up the BOARD to make it say "board" instead. That matches
the west build --board option name a bit more closely and is still
legible.

Likewise, let's not print any west build messages if we're just
incrementally recompiling. That's noisy.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-03-05 14:20:18 -08:00 committed by Johan Hedberg
commit 34a59168d5
2 changed files with 4 additions and 13 deletions

View file

@ -63,6 +63,8 @@ set(__build_dir ${CMAKE_CURRENT_BINARY_DIR}/zephyr)
set(PROJECT_BINARY_DIR ${__build_dir})
message(STATUS "Application: ${APPLICATION_SOURCE_DIR}")
add_custom_target(code_data_relocation_target)
# CMake's 'project' concept has proven to not be very useful for Zephyr
@ -177,7 +179,7 @@ else()
endif()
assert(BOARD "BOARD not set")
message(STATUS "Selected BOARD ${BOARD}")
message(STATUS "Board: ${BOARD}")
# Store the selected board in the cache
set(CACHED_BOARD ${BOARD} CACHE STRING "Selected board")

View file

@ -361,16 +361,6 @@ class Build(Forceable):
self._sanity_check_source_dir()
def _run_cmake(self, board, origin, cmake_opts):
_banner(
'''build configuration:
source directory: {}
build directory: {}{}
BOARD: {}'''.
format(self.source_dir, self.build_dir,
' (created)' if self.created_build_dir else '',
('{} (origin: {})'.format(board, origin) if board
else 'UNKNOWN')))
if board is None and config_getboolean('board_warn', True):
log.wrn('This looks like a fresh build and BOARD is unknown;',
"so it probably won't work. To fix, use",
@ -379,7 +369,6 @@ class Build(Forceable):
"'west config build.board_warn false'")
if not self.run_cmake:
log.dbg('Not generating a build system; one is present.')
return
_banner('generating a build system')
@ -427,7 +416,7 @@ class Build(Forceable):
def _run_build(self, target):
if target:
_banner('running target {}'.format(target))
else:
elif self.run_cmake:
_banner('building application')
extra_args = ['--target', target] if target else []
if self.args.build_opt: