From c15d3c9126e945627b940c90edbf1d193c8fb28e Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 21 Nov 2017 18:54:55 -0500 Subject: [PATCH] cmake: support other emulation platforms/runners Right now we are hardcoded to only qemu, with the native port, we make this more generic and support this in a plugin mode where a running has its own cmake definitons implementing the various targets. Signed-off-by: Anas Nashif Signed-off-by: Alberto Escolar Piedras --- CMakeLists.txt | 5 ++++- boards/posix/native_posix/board.cmake | 1 + cmake/{qemu/CMakeLists.txt => emu/qemu.cmake} | 0 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 boards/posix/native_posix/board.cmake rename cmake/{qemu/CMakeLists.txt => emu/qemu.cmake} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49abc10cb1e..449a44a77e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -809,7 +809,10 @@ if(CONFIG_OUTPUT_PRINT_MEMORY_USAGE) target_link_libraries_ifdef(${check} zephyr_prebuilt ${option}) endif() -add_subdirectory(cmake/qemu) +if(EMU_PLATFORM) + include($ENV{ZEPHYR_BASE}/cmake/emu/${EMU_PLATFORM}.cmake) +endif() + add_subdirectory(cmake/flash) add_subdirectory(cmake/usage) diff --git a/boards/posix/native_posix/board.cmake b/boards/posix/native_posix/board.cmake new file mode 100644 index 00000000000..c4a78fce884 --- /dev/null +++ b/boards/posix/native_posix/board.cmake @@ -0,0 +1 @@ +set(EMU_PLATFORM native) diff --git a/cmake/qemu/CMakeLists.txt b/cmake/emu/qemu.cmake similarity index 100% rename from cmake/qemu/CMakeLists.txt rename to cmake/emu/qemu.cmake