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:
Andy Ross 2019-02-14 08:20:47 -08:00 committed by Anas Nashif
commit 154c20ce7a

View file

@ -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}