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)