Lines Matching +full:- +full:- +full:quiet

1 # SPDX-License-Identifier: Apache-2.0
3 # Copyright (c) 2022-2023, Nordic Semiconductor ASA
5 # FindZephyr-sdk module for supporting module search mode of Zephyr SDK.
7 # It is possible to control the behavior of the Zephyr-SDK package using
9 # The Zephyr-SDK package supports the components:
10 # - LOAD: Load a Zephyr-SDK. This is the default behavior if no COMPONENTS is specified.
15 # It extends the Zephyr-sdk CMake package by providing more flexibility in when
25 # 'Zephyr-sdk_FOUND'
28 # - LIST: Will list all available Zephyr SDKs found in the system but not load
29 # any Sdk. This can be used to fetch available Zephyr-SDKs before doing
32 # - Zephyr-sdk : Version of a Zephyr-SDK
33 # - Zephyr-sdk_DIRS : Install dir of the Zephyr-SDK
34 # Each entry in Zephyr-SDK has a corresponding entry in Zephyr-SDK_DIRS.
36 # index: Zephyr-sdk: Zephyr-sdk_DIRS:
37 # 0 0.15.0 /opt/zephyr-sdk-0.15.0
38 # 1 0.16.0 /home/<user>/zephyr-sdk-0.16.0
48 if("${Zephyr-sdk_FIND_COMPONENTS}" STREQUAL "")
49 set(Zephyr-sdk_FIND_COMPONENTS LOAD)
60 (Zephyr-sdk_FIND_REQUIRED))
63 if (NOT Zephyr-sdk_FIND_QUIETLY AND
75 if(DEFINED ZEPHYR_SDK_INSTALL_DIR AND LOAD IN_LIST Zephyr-sdk_FIND_COMPONENTS)
80 find_package(Zephyr-sdk ${Zephyr-sdk_FIND_VERSION_COMPLETE}
81 REQUIRED QUIET CONFIG HINTS ${ZEPHYR_SDK_INSTALL_DIR}
100 find_package(Zephyr-sdk 0.0.0 EXACT QUIET CONFIG PATHS ${zephyr_sdk_search_paths})
103 … foreach(version config IN ZIP_LISTS Zephyr-sdk_CONSIDERED_VERSIONS Zephyr-sdk_CONSIDERED_CONFIGS)
104 if(NOT DEFINED Zephyr-sdk-${version}_DIR)
105 set(Zephyr-sdk-${version}_DIR ${config})
109 list(REMOVE_DUPLICATES Zephyr-sdk_CONSIDERED_VERSIONS)
110 list(SORT Zephyr-sdk_CONSIDERED_VERSIONS COMPARE NATURAL ORDER DESCENDING)
112 if(LIST IN_LIST Zephyr-sdk_FIND_COMPONENTS)
113 set(Zephyr-sdk)
114 set(Zephyr-sdk_DIRS)
116 foreach(version ${Zephyr-sdk_CONSIDERED_VERSIONS})
117 cmake_path(GET Zephyr-sdk-${version}_DIR PARENT_PATH dir)
119 list(APPEND Zephyr-sdk ${version})
120 list(APPEND Zephyr-sdk_DIRS ${dir})
121 if (NOT Zephyr-sdk_FIND_QUIETLY)
122 message(STATUS "Zephyr-sdk, version=${version}, dir=${dir}")
126 if("${Zephyr-sdk_FIND_VERSION_RANGE_MAX}" STREQUAL "INCLUDE")
130 if(NOT DEFINED Zephyr-sdk_FIND_VERSION_RANGE)
132 set(Zephyr-sdk_FIND_VERSION_MAX 99999999)
136 foreach(zephyr_sdk_candidate ${Zephyr-sdk_CONSIDERED_VERSIONS})
137 if("${zephyr_sdk_candidate}" VERSION_GREATER_EQUAL "${Zephyr-sdk_FIND_VERSION}"
138 AND "${zephyr_sdk_candidate}" VERSION_LESS${upper_bound} "${Zephyr-sdk_FIND_VERSION_MAX}"
142 … cmake_path(GET Zephyr-sdk-${zephyr_sdk_candidate}_DIR PARENT_PATH zephyr_sdk_current_check_path)
146 …find_package(Zephyr-sdk ${Zephyr-sdk_FIND_VERSION_COMPLETE} QUIET CONFIG PATHS ${zephyr_sdk_curren…
148 if (${Zephyr-sdk_FOUND})
156 if (NOT ${Zephyr-sdk_FOUND})
159 …find_package(Zephyr-sdk ${Zephyr-sdk_FIND_VERSION_COMPLETE} REQUIRED CONFIG PATHS ${zephyr_sdk_sea…
175 if(LOAD IN_LIST Zephyr-sdk_FIND_COMPONENTS)
181 if(Zephyr-sdk_FOUND)
182 include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/host-tools.cmake)
184 if (NOT Zephyr-sdk_FIND_QUIETLY)
185 message(STATUS "Found host-tools: zephyr ${SDK_VERSION} (${ZEPHYR_SDK_INSTALL_DIR})")