Skip to content

Commit

Permalink
Zephyr integration: Add support for POSIX architecture
Browse files Browse the repository at this point in the history
When building for CMAKE_SYSTEM_PROCESSOR will be set to
"posix" which is not usefull. Let's rename it instead
to something else we can use.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
  • Loading branch information
aescolar committed Oct 11, 2023
1 parent 653bd59 commit b055d15
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ set(WITH_ZEPHYR_LIB 1)
set(WITH_DOC OFF CACHE BOOL "" FORCE)
set(WITH_DEFAULT_LOGGER OFF CACHE BOOL "" FORCE)

if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "posix")
# When building Zephyr for the POSIX architecture
# CMAKE_SYSTEM_PROCESSOR is set to POSIX. We need
# to set it to something that exists.
set(CMAKE_SYSTEM_PROCESSOR "zephyr_native")
endif()

add_subdirectory(${CONFIG_LIBMETAL_SRC_PATH} libmetal)
endif()

0 comments on commit b055d15

Please sign in to comment.