40
.clang-format
Normal file
40
.clang-format
Normal file
@@ -0,0 +1,40 @@
|
||||
# <project>/.clang-format
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 2
|
||||
TabWidth: 2
|
||||
UseTab: Never
|
||||
|
||||
# Stop collapsing things to one line
|
||||
# AllowShortFunctionsOnASingleLine: None # or 'Empty' if you want only {} allowed
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
|
||||
# Top-level switches
|
||||
AlignTrailingComments: true # align // comments across consecutive lines
|
||||
|
||||
# Align declarations in neat columns
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignFunctionDeclarations: true # optional, aligns return types for funcs
|
||||
AlignFunctionPointers: true # optional
|
||||
|
||||
# Align assignments too (and pad short ops so columns line up)
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: true # include +=, -=, etc.
|
||||
PadOperators: true # only valid here
|
||||
|
||||
SortIncludes: true
|
||||
IncludeBlocks: Merge
|
||||
IncludeCategories:
|
||||
- Regex: '^".*"'
|
||||
Priority: 1
|
||||
- Regex: '^<.*>'
|
||||
Priority: 2
|
||||
|
||||
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
*
|
||||
|
||||
!CMakeLists.txt
|
||||
!.ignore
|
||||
!.gitignore
|
||||
|
||||
!README.md
|
||||
|
||||
!.clang-format
|
||||
8
.ignore
Normal file
8
.ignore
Normal file
@@ -0,0 +1,8 @@
|
||||
.cache
|
||||
.ignore
|
||||
compile_commands.json
|
||||
|
||||
build/
|
||||
obj/
|
||||
bin/
|
||||
.git/
|
||||
17
CMakeLists.txt
Normal file
17
CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(
|
||||
cpp_boilerplate
|
||||
VERSION 1.0.0
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
|
||||
|
||||
# Main executable
|
||||
add_executable(${PROJECT_NAME} src/main.cpp)
|
||||
Reference in New Issue
Block a user