added format target

This commit is contained in:
Luka Jankovic 2025-09-27 16:31:07 +02:00
parent ccdd081d36
commit fb8ff21666
2 changed files with 11 additions and 0 deletions

5
.clang-format Normal file
View file

@ -0,0 +1,5 @@
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Never
Cpp11BracedListStyle: false

View file

@ -47,6 +47,12 @@ set(SOURCES
${STATES_SOURCES} ${STATES_SOURCES}
) )
add_custom_target(format
COMMAND clang-format -i -- **.c **.h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Formatting source files..."
)
add_executable(kubo ${SOURCES}) add_executable(kubo ${SOURCES})
if(MSVC) if(MSVC)