cmake: qemu: Restore QEMU_PTY/QEMU_PIPE option handling.
Both options were originally parameters to *make*, not cmake, so people can augment QEMU ibocation from run to run, not from complete rebuild to complete rebuild. Make them such again. However, just in case, ability to set "default" value for those options on CMake level is preserved. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
f71c3fa665
commit
83cf82b7a8
1 changed files with 10 additions and 5 deletions
|
@ -6,18 +6,23 @@ if(EMU_PLATFORM)
|
||||||
debugserver
|
debugserver
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QEMU_FLAGS -serial)
|
# We can set "default" value for QEMU_PTY & QEMU_PIPE on cmake invocation.
|
||||||
if(QEMU_PTY)
|
if(QEMU_PTY)
|
||||||
list(APPEND QEMU_FLAGS pty)
|
# Send console output to a pseudo-tty, used for running automated tests
|
||||||
|
set(CMAKE_QEMU_SERIAL0 pty)
|
||||||
else()
|
else()
|
||||||
if(QEMU_PIPE)
|
if(QEMU_PIPE)
|
||||||
# Send console output to a pipe, used for running automated sanity tests
|
# Send console output to a pipe, used for running automated tests
|
||||||
list(APPEND QEMU_FLAGS pipe:${QEMU_PIPE})
|
set(CMAKE_QEMU_SERIAL0 pipe:${QEMU_PIPE})
|
||||||
else()
|
else()
|
||||||
list(APPEND QEMU_FLAGS mon:stdio)
|
set(CMAKE_QEMU_SERIAL0 mon:stdio)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# But also can set QEMU_PTY & QEMU_PIPE on *make* (not cmake) invocation,
|
||||||
|
# like it was before cmake.
|
||||||
|
set(QEMU_FLAGS -serial \${if \${QEMU_PTY}, pty, \${if \${QEMU_PIPE}, pipe:\${QEMU_PIPE}, ${CMAKE_QEMU_SERIAL0}}})
|
||||||
|
|
||||||
# Add a BT serial device when building for bluetooth, unless the
|
# Add a BT serial device when building for bluetooth, unless the
|
||||||
# application explicitly opts out with NO_QEMU_SERIAL_BT_SERVER.
|
# application explicitly opts out with NO_QEMU_SERIAL_BT_SERVER.
|
||||||
if(CONFIG_BT)
|
if(CONFIG_BT)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue