From 722fce888dd29b7e26346f3dec85878a2710cc23 Mon Sep 17 00:00:00 2001 From: Simon Hardt Date: Tue, 22 Feb 2022 23:22:29 +0100 Subject: [PATCH] Init --- .clang-format | 71 ++++++++++++++++++++++++++++++++++++++++++ .gitignore | 19 +++++++++++ CMakeLists.txt | 16 ++++++++++ Modules/CMakeLists.txt | 0 vcpkg.json | 7 +++++ 5 files changed, 113 insertions(+) create mode 100644 .clang-format create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 Modules/CMakeLists.txt create mode 100644 vcpkg.json diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..8fa7edb --- /dev/null +++ b/.clang-format @@ -0,0 +1,71 @@ +Language: Cpp +TabWidth: 4 +UseTab: Never +AccessModifierOffset: -4 +MaxEmptyLinesToKeep: 4 +ColumnLimit: 100 +ContinuationIndentWidth: 2 +IndentWidth: 4 + +BinPackArguments: false + +AlignConsecutiveAssignments: true +AlignTrailingComments: true +AlignAfterOpenBracket: Align + +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false + +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: Never +AllowShortLambdasOnASingleLine: Empty +AllowShortLoopsOnASingleLine: false + + +AlwaysBreakTemplateDeclarations: Yes + +BreakBeforeBraces: Custom +BraceWrapping: + AfterClass: true + AfterStruct: true + BeforeCatch: true + AfterControlStatement: "Always" + AfterFunction: true + AfterNamespace: true + AfterUnion: true + SplitEmptyFunction: true + SplitEmptyNamespace: true + SplitEmptyRecord: true + +BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterColon +BreakStringLiterals: true + +Cpp11BracedListStyle: false + +FixNamespaceComments: true + +IncludeBlocks: Preserve +SortIncludes: true + +IndentCaseLabels: true + +KeepEmptyLinesAtTheStartOfBlocks: false +NamespaceIndentation: All + +PointerAlignment: Left + +SortUsingDeclarations: true + +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: true +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeRangeBasedForLoopColon: true + +SpacesBeforeTrailingComments: 4 + +Standard: Auto \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cdd0e5c --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +cmake-build-debug +.idea +.vs/ + +cmake-build-release/ + +CMakeSettings.json diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..900e373 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.16) + +if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{VCPKG_ROOT}) + set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake") +endif() +message("using vcpkg toolchain: ${CMAKE_TOOLCHAIN_FILE}" ) + +project({{template}}) + +set(CMAKE_CXX_STANDARD 20) + + +find_package(fmt CONFIG REQUIRED) + + +add_subdirectory(Modules) \ No newline at end of file diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..97a5f05 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "template", + "version-string": "0.0.1", + "dependencies": [ + "fmt" + ] +} \ No newline at end of file