Swap lookup order for clang-format

Look for the binary with exact version before looking for the
generic name to prevent failure when clang-format is lower then
required version but clang-format-14 exists.
This commit is contained in:
Sven Klemm 2022-11-01 11:11:48 +01:00 committed by Sven Klemm
parent d51fefb744
commit 3d30f07bf4

View File

@ -389,7 +389,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXT_CONTROL_FILE}
find_program(
CLANG_FORMAT
NAMES clang-format clang-format-14
NAMES clang-format-14 clang-format
PATHS /usr/bin /usr/local/bin /usr/local/opt/ /usr/local/opt/llvm/bin /opt/bin
DOC "The path to clang-format")