cmake/emu: Add qemu SMP flags automatically
No need to do this in arch code, all qemu variants speak the same command line and the kconfig values we need are easily available. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
0a2d2413e0
commit
154c20ce7a
1 changed files with 5 additions and 0 deletions
|
@ -227,6 +227,10 @@ if(NOT QEMU_PIPE)
|
|||
set(QEMU_PIPE_COMMENT "\nTo exit from QEMU enter: 'CTRL+a, x'\n")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SMP)
|
||||
list(APPEND QEMU_SMP_FLAGS -smp cpus=${CONFIG_MP_NUM_CPUS})
|
||||
endif()
|
||||
|
||||
# Use flags passed in from the environment
|
||||
set(env_qemu $ENV{QEMU_EXTRA_FLAGS})
|
||||
separate_arguments(env_qemu)
|
||||
|
@ -254,6 +258,7 @@ foreach(target ${qemu_targets})
|
|||
${QEMU_FLAGS}
|
||||
${QEMU_EXTRA_FLAGS}
|
||||
${MORE_FLAGS_FOR_${target}}
|
||||
${QEMU_SMP_FLAGS}
|
||||
${QEMU_KERNEL_OPTION}
|
||||
DEPENDS ${logical_target_for_zephyr_elf}
|
||||
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue