summaryrefslogtreecommitdiff
path: root/Source/cmake/FindClang.cmake
blob: 1fc86bb32e0d520f30a9e94eb00584c84f8717bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# Check for Clang.
#
# The following variables are set:
#  CLANG_EXE
#  CLANG_VERSION

find_program(CLANG_EXE NAMES "clang")

execute_process(COMMAND ${CLANG_EXE} --version OUTPUT_VARIABLE CLANG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CLANG DEFAULT_MSG
                                  CLANG_VERSION)

mark_as_advanced(CLANG_VERSION)