cmake: check ZEPHYR_SDK_INSTALL_DIR is set

Check for ZEPHYR_SDK_INSTALL_DIR being invalid instead of
checking for SDK_VERSION being not defined. This change
relates to commit bb09c458c1 ("cmake: Prevent infinite
recursion").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2019-07-03 08:40:56 +05:30 committed by Anas Nashif
commit a1e25b91ff

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
if(NOT DEFINED SDK_VERSION)
message(FATAL_ERROR "SDK_VERSION must be set")
if (NOT ZEPHYR_SDK_INSTALL_DIR)
message(FATAL_ERROR "ZEPHYR_SDK_INSTALL_DIR must be set")
endif()
include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/${SDK_VERSION}/generic.cmake)