Browse Source

rename template files, add CMake stuff to gitignore

master
Taylor Bockman 5 years ago
parent
commit
236e246e54
  1. 4
      dotfiles/bash/scripts/cgen.sh
  2. 13
      dotfiles/bash/scripts/cgen_etc/clang_format_template
  3. 97
      dotfiles/bash/scripts/cgen_etc/gitignore_template

4
dotfiles/bash/scripts/cgen.sh

@ -72,10 +72,10 @@ echo "add_executable($name \${SOURCE} \${INCLUDE})" >> $cmake_config
echo "Copying .clang-format..." echo "Copying .clang-format..."
cp $script_dir/cgen_etc/template_clang_format $name/.clang-format cp $script_dir/cgen_etc/clang_format_template $name/.clang-format
echo "Copying .gitignore..." echo "Copying .gitignore..."
cp $script_dir/cgen_etc/template_gitignore $name/.gitignore cp $script_dir/cgen_etc/gitignore_template $name/.gitignore
sample_file=$name/src/main.c sample_file=$name/src/main.c

13
dotfiles/bash/scripts/cgen_etc/clang_format_template

@ -0,0 +1,13 @@
AlignConsecutiveAssignments: 'true'
AlignTrailingComments: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: 'false'
BreakBeforeBraces: Allman
ColumnLimit: '120'
IndentWidth: '4'
PointerAlignment: Right
SortIncludes: 'false'

97
dotfiles/bash/scripts/cgen_etc/gitignore_template

@ -0,0 +1,97 @@
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Vim
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
# CMake
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
Loading…
Cancel
Save