Initial Commit

Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
2025-08-26 11:48:07 -05:00
commit dc405f4c99
5 changed files with 80 additions and 0 deletions

40
.clang-format Normal file
View 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
View File

@@ -0,0 +1,9 @@
*
!CMakeLists.txt
!.ignore
!.gitignore
!README.md
!.clang-format

8
.ignore Normal file
View File

@@ -0,0 +1,8 @@
.cache
.ignore
compile_commands.json
build/
obj/
bin/
.git/

17
CMakeLists.txt Normal file
View 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)

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
```
# from the project root
cmake -S . -B build -G Ninja
cmake --build build
./build/cpp_boilerplate
```