2017-10-27 21:43:34 +08:00
|
|
|
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR ${ARCH})
|
|
|
|
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
|
|
|
|
|
|
# Configure the toolchain based on what SDK/toolchain is in use.
|
2017-10-03 22:31:55 +08:00
|
|
|
if(ZEPHYR_GCC_VARIANT STREQUAL "host" OR CONFIG_ARCH_POSIX)
|
|
|
|
set(COMPILER host-gcc)
|
|
|
|
else()
|
2018-01-11 22:46:44 +08:00
|
|
|
include(${ZEPHYR_BASE}/cmake/toolchain-${ZEPHYR_GCC_VARIANT}.cmake)
|
2017-10-03 22:31:55 +08:00
|
|
|
endif()
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
# Configure the toolchain based on what toolchain technology is used
|
2018-01-09 00:05:26 +08:00
|
|
|
# (gcc, host-gcc etc.)
|
2018-01-11 22:46:44 +08:00
|
|
|
include(${ZEPHYR_BASE}/cmake/toolchain-${COMPILER}.cmake OPTIONAL)
|