Skip to content

Commit b850af1

Browse files
committed
Make clang-format optional
Signed-off-by: Stephen Gallagher <[email protected]>
1 parent c92c2d5 commit b850af1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project('sscg', 'c',
77
'b_asneeded=true',
88
],
99
license : 'MIT',
10-
meson_version : '>=0.40.0')
10+
meson_version : '>=0.44.0')
1111

1212
cc = meson.get_compiler('c')
1313
test_cflags = [
@@ -110,7 +110,11 @@ sscg = executable(
110110
)
111111

112112
# Fake test to ensure that all sources and headers are formatted properly
113-
test_clang_format = find_program('clang-format')
113+
test_clang_format = find_program('clang-format', required: false)
114+
if not test_clang_format.found()
115+
test_clang_format = disabler()
116+
endif
117+
114118
clang_args = [ '-i' ]
115119
test('test_clang_format', test_clang_format,
116120
args : clang_args + files(sscg_lib_srcs + sscg_lib_hdrs + sscg_bin_srcs))

0 commit comments

Comments
 (0)