Skip to content
Permalink
Browse files

cmake: Set TOOLCHAIN_HOME for Zephyr's SDK

Host-tools don't unconditionally set TOOLCHAIN_HOME anymore,
but in case Zephyr's SDK toolchain is used, set TOOLCHAIN_HOME.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
  • Loading branch information...
ozhuraki authored and nashif committed Mar 8, 2019
1 parent de603c0 commit 274a4a28df20a83c7a77f9d9e1dfe94612ecb442
Showing with 5 additions and 0 deletions.
  1. +5 −0 cmake/generic_toolchain.cmake
@@ -41,6 +41,11 @@ if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "gccarmemb")
set(ZEPHYR_TOOLCHAIN_VARIANT "gnuarmemb")
endif()

# Host-tools don't unconditionally set TOOLCHAIN_HOME anymore,
# but in case Zephyr's SDK toolchain is used, set TOOLCHAIN_HOME
if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "zephyr")
set(TOOLCHAIN_HOME ${HOST_TOOLS_HOME})
endif()

set(TOOLCHAIN_ROOT ${TOOLCHAIN_ROOT} CACHE STRING "Zephyr toolchain root")
assert(TOOLCHAIN_ROOT "Zephyr toolchain root path invalid: please set the TOOLCHAIN_ROOT-variable")

0 comments on commit 274a4a2

Please sign in to comment.
You can’t perform that action at this time.