Skip to content

Commit 274a4a2

Browse files
ozhurakinashif
authored andcommitted
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 <[email protected]>
1 parent de603c0 commit 274a4a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/generic_toolchain.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "gccarmemb")
4141
set(ZEPHYR_TOOLCHAIN_VARIANT "gnuarmemb")
4242
endif()
4343

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

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

0 commit comments

Comments
 (0)