mirror of
https://github.com/seL4/seL4.git
synced 2026-04-04 22:39:54 +00:00
cmake: add kernel platform helpers.
Add kernel_platforms_string and kernel_platforms_list to tools/helpers.cmake. kernel_platforms_string: concatenates all platform strings together into a newline separated string. kernel_platforms_list: returns a list of all kernel platforms.
This commit is contained in:
@@ -510,3 +510,15 @@ macro(list_append_if list dep)
|
||||
endif()
|
||||
set(${list} ${list_append_local_list} PARENT_SCOPE)
|
||||
endmacro(list_append_if)
|
||||
|
||||
macro(kernel_platforms_list target)
|
||||
list(APPEND ${target} ${KernelRiscVPlatform_all_strings})
|
||||
list(APPEND ${target} ${KernelX86Sel4Arch_all_strings})
|
||||
list(APPEND ${target} ${KernelARMPlatform_all_strings})
|
||||
endmacro(kernel_platforms_list)
|
||||
|
||||
macro(kernel_platforms_string target)
|
||||
set(plat_names "")
|
||||
kernel_platforms_list(plat_names)
|
||||
string(REPLACE ";" "\n " ${target} "${plat_names}")
|
||||
endmacro(kernel_platforms_string)
|
||||
|
||||
Reference in New Issue
Block a user