cmake: flash: support verbose output toggle

If CMAKE_VERBOSE_MAKEFILE is defined, make flashing and debugging more
verbose.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This commit is contained in:
Marti Bolivar 2017-11-27 14:39:43 -05:00 committed by Anas Nashif
commit 8447b5ea2e

View file

@ -14,6 +14,13 @@ set(RUNNER_ARGS_COMMON
"--openocd-search=${OPENOCD_DEFAULT_PATH}"
)
# Enable verbose output, if requested.
if(CMAKE_VERBOSE_MAKEFILE)
set(RUNNER_VERBOSE "--verbose")
else()
set(RUNNER_VERBOSE)
endif()
foreach(target flash debug debugserver)
string(TOUPPER "${target}" target_upper)
@ -42,6 +49,7 @@ foreach(target flash debug debugserver)
${CMAKE_COMMAND} -E env
${PYTHON_EXECUTABLE}
$ENV{ZEPHYR_BASE}/scripts/support/zephyr_flash_debug.py
${RUNNER_VERBOSE}
${runner}
${target}
${RUNNER_ARGS_COMMON}