From 75585f4fb6f312195a47b16224d45e671858dac7 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 21 Apr 2025 14:35:44 -0700 Subject: Initial xmake C++ project --- .clang-format | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .editorconfig | 9 +++++++++ .gitignore | 9 +++++++++ src/main.cpp | 0 xmake.lua | 7 +++++++ 5 files changed, 86 insertions(+) create mode 100644 .clang-format create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 src/main.cpp create mode 100644 xmake.lua diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..768d40f --- /dev/null +++ b/.clang-format @@ -0,0 +1,61 @@ +--- +BasedOnStyle: LLVM +AccessModifierOffset: -4 +AlignAfterOpenBracket: DontAlign +AlignOperands: false +AlignTrailingComments: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowAllArgumentsOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: MultiLine +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + AfterClass: false + AfterControlStatement: MultiLine + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeComma +ColumnLimit: 0 +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: false +IncludeCategories: + - Regex: '".*"' + Priority: 1 + - Regex: '^<.*\.h>' + Priority: 2 + - Regex: '^<.*' + Priority: 3 +IndentCaseLabels: true +IndentPPDirectives: AfterHash +IndentWidth: 4 +NamespaceIndentation: None +PointerAlignment: Left +TabWidth: 4 +UseTab: Never +--- +Language: Cpp +Standard: Latest diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..05ab5fb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[**.{hpp,cpp,cppm}] +indent_style = space +indent_size = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ffe45c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/.local + +/.xmake +/.vs +/vs* +/build + +# MacOS +.DS_Store diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..e69de29 diff --git a/xmake.lua b/xmake.lua new file mode 100644 index 0000000..52e842f --- /dev/null +++ b/xmake.lua @@ -0,0 +1,7 @@ +add_rules("mode.debug", "mode.release") + +set_languages("c++23") + +target("sand-physics") + set_kind("binary") + add_files("src/**.cpp") -- cgit v1.2.3-70-g09d2