Create project skeleton

This commit is contained in:
Camden Dixie O'Brien 2024-11-03 19:37:07 +00:00
commit 586287dcfa
4 changed files with 47 additions and 0 deletions

21
.clang-format Normal file
View File

@ -0,0 +1,21 @@
---
BasedOnStyle: WebKit
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
TabWidth: 4
UseTab: ForIndentation
DerivePointerAlignment: false
PointerAlignment: Right
BinPackArguments: true
BinPackParameters: true
ExperimentalAutoDetectBinPacking: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: None
ColumnLimit: 77
...

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build

16
CMakeLists.txt Normal file
View File

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.10)
project(maze-thing LANGUAGES C)
option(SANITIZERS "Enable undefined behaviour and address sanitizers" ON)
add_executable(maze-thing main.c)
set_property(TARGET maze-thing PROPERTY C_STANDARD 11)
set_property(TARGET maze-thing PROPERTY C_EXTENSIONS OFF)
target_compile_options(maze-thing PRIVATE -Wall -Wextra -pedantic)
if(${SANITIZERS})
target_compile_options(maze-thing PRIVATE -fsanitize=address,undefined)
target_link_options(maze-thing PRIVATE -fsanitize=address,undefined)
endif()

9
main.c Normal file
View File

@ -0,0 +1,9 @@
/*
* Copyright (c) Camden Dixie O'Brien
* SPDX-License-Identifier: AGPL-3.0-only
*/
int main(void)
{
return EXIT_SUCCESS;
}