From fb8ff216665a071e0813c6d5955c1355f193d4ac Mon Sep 17 00:00:00 2001 From: Luka Jankovic Date: Sat, 27 Sep 2025 16:31:07 +0200 Subject: [PATCH] added format target --- .clang-format | 5 +++++ CMakeLists.txt | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..3d2d9f0 --- /dev/null +++ b/.clang-format @@ -0,0 +1,5 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +Cpp11BracedListStyle: false diff --git a/CMakeLists.txt b/CMakeLists.txt index ef204f8..0fc5e85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,12 @@ set(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}) if(MSVC)