Skip to content
Permalink
Browse files

cmake: Prevent infinite recursion

If SDK_VERSION for whatever reason is unset cmake will end up in an
inifite recursion loop, which for me crashed using cmake version
3.13.4 and exits with an error using 3.14.1.

This may happen if ZEPHYR_TOOLCHAIN_VARIANT is set to "zephyr", but
ZEPHYR_SDK_INSTALL_DIR is invalid (or unset).

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
  • Loading branch information...
jsiverskog authored and nashif committed Apr 1, 2019
1 parent 78714b4 commit bb09c458c18f452a024ddb07a5754f5829454341
Showing with 4 additions and 0 deletions.
  1. +4 −0 cmake/toolchain/zephyr/generic.cmake
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

if(NOT DEFINED SDK_VERSION)
message(FATAL_ERROR "SDK_VERSION must be set")
endif()

include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/${SDK_VERSION}/generic.cmake)

0 comments on commit bb09c45

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