chore: add ninja format command
This commit is contained in:
+6
-2
@@ -40,7 +40,6 @@ tgbot_dep = declare_dependency(
|
|||||||
)
|
)
|
||||||
|
|
||||||
cppcheck = find_program('cppcheck', required: false)
|
cppcheck = find_program('cppcheck', required: false)
|
||||||
|
|
||||||
if cppcheck.found()
|
if cppcheck.found()
|
||||||
run_target(
|
run_target(
|
||||||
'cppcheck',
|
'cppcheck',
|
||||||
@@ -57,10 +56,15 @@ if cppcheck.found()
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
clangformat = find_program('clang-format', required: false)
|
||||||
|
if clangformat.found()
|
||||||
|
run_target('format', command: [clangformat, '-i', sources])
|
||||||
|
endif
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
executable(
|
executable(
|
||||||
'example',
|
'example',
|
||||||
'examples/sender/sendpic.c',
|
'examples/sender/sendpic.c',
|
||||||
dependencies: tgbot_dep,
|
dependencies: tgbot_dep,
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user