zephyr/cmake/compiler/clang/generic.cmake
Oleg Zhurakivskyy 2688bfad8e cmake: clang: Detect host installed clang
In case TOOLCHAIN_HOME isn't explicitly reuqested,
(or indirectly forced with CLANG_ROOT_DIR), detect
any host installed clang in the path.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-04-30 09:33:54 -04:00

9 lines
210 B
CMake

# SPDX-License-Identifier: Apache-2.0
if(DEFINED TOOLCHAIN_HOME)
set(find_program_clang_args PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
endif()
find_program(CMAKE_C_COMPILER clang ${find_program_clang_args})