Junio C Hamano <gitster@xxxxxxxxx> writes: > Karthik Nayak <karthik.188@xxxxxxxxx> writes: > >>>> diff --git a/meson.build b/meson.build >>>> index 7fea4a34d6..578db26df2 100644 >>>> --- a/meson.build >>>> +++ b/meson.build >>>> @@ -2144,6 +2144,18 @@ if headers_to_check.length() != 0 and compiler.get_argument_syntax() == 'gcc' >>>> alias_target('check-headers', hdr_check) >>>> endif >>>> >>>> +clang_format = find_program('clang-format', required: false) >>> >>> Should we be checking for `git-clang-format` instead? >>> >> >> Yeah. While `git-clang-format` is packaged with `clang-format`, it does >> make more sense to check for the former. > > Just for my education, what does find_program() look for? Installed > packages, or a program on your $PATH? I am guessing that the answer > is the latter, in which case it is not like "it makes more sense to > check for git-clang-format"---rather it is "it would not work at all > if we looked for clang-format", no? > > Thanks. Good question. To quote from the documentation [1]: find_program() program_name here is a string that can be an executable or script to be searched for in PATH or other places inside the project. So, 'git-clang-format' would work. I've also verified the same on my end. [1]: https://mesonbuild.com/Reference-manual_functions.html#find_program
Attachment:
signature.asc
Description: PGP signature