Skip to content

Commit

Permalink
Merge pull request #8 from keeferrourke/development
Browse files Browse the repository at this point in the history
update master to v0.0.2
  • Loading branch information
keeferrourke authored Apr 17, 2019
2 parents de7a32c + 62357c7 commit ad28eaa
Show file tree
Hide file tree
Showing 27 changed files with 791 additions and 320 deletions.
108 changes: 108 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 78
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 4
UseTab: Never
...

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*.o
a.out
vgcore.*
docs/*
lib/*
obj/*
**/*build

38 changes: 38 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
sudo: false
language: c

os:
- linux
- osx
dist: xenial
osx_image: xcode10.2

env:
- CC=gcc
- CC=clang

addons:
apt:
packages:
- clang-format
- cppcheck
homebrew:
packages:
- ninja
- meson
- clang-format
- cppcheck

before_install:
- |+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get -q update
sudo apt-get -y install meson/xenial-backports
fi
before_script:
- meson _build
- ninja -C _build cppcheck

script:
- ninja -C _build all
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2018-2019 Keefer Rourke <mail@krourke.org>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 changes: 21 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ STD = -std=c99 -D_POSIX_C_SOURCE=199506L
WD := $(PWD)
INCLDIR = $(WD)/include
SRCDIR = $(WD)/src
OBJDIR = $(WD)/obj
OUTDIR = $(WD)/lib
BUILDDIR = $(WD)/_build
OBJDIR = $(BUILDDIR)/obj
OUTDIR = $(BUILDDIR)/lib

# DOCDIR and TEXDIR must match the appropriate directories specified in the
# Doxyfile; TEXDIR is a subdirectory of DOCDIR
DOCDIR = docs
TEXDIR = latex
BUILTDOCDIR = $(BUILDDIR)/docs

# library output
OUTNAME = libtdd
Expand Down Expand Up @@ -86,31 +87,38 @@ $(OBJDIR):
$(OUTDIR):
@mkdir -p $(OUTDIR)

$(BUILTDOCDIR):
@mkdir -p $(BUILTDOCDIR)

# generate docs with doxygen
# this is intended to be used with a Doxyfile that specified LaTeX output
# modify as required for different documentation formats
#
# inelegant, but if doxygen fails for some reason, it is not the end of the
# world
.PHONY: doc doc-clean
doc: Doxyfile
doc: $(BUILTDOCDIR) $(DOCDIR)/Doxyfile.in
-@cp $(DOCDIR)/Doxyfile.in Doxyfile
-@sed -i "s/@HAS_DOT@/NO/g" Doxyfile
-@sed -i "s/@HTML_PAGES@/YES/g" Doxyfile
-@sed -i "s/@GEN_LATEX@/NO/g" Doxyfile
-@sed -i "s/@MAN_PAGES@/YES/g" Doxyfile
-@sed -i "s/@PROJECT_NAME@/$(OUTNAME)/g" Doxyfile
-@sed -i "s/@VERSION@//g" Doxyfile
-@sed -i "s|@DOCS_OUTPUT_DIR@|$(BUILTDOCDIR)|g" Doxyfile
-@sed -i "s|@INCLUDE_DIR@|$(INCLDIR)|g" Doxyfile
-@sed -i "s|@README_PATH|README.md|g" Doxyfile
@doxygen 2>/dev/null 1>&2
-@echo 'Generating application internal documentation...'
# generate PDF from LaTeX sources
-@cd $(DOCDIR)/$(TEXDIR) && $(MAKE) 2>/dev/null 1>&2
-@mv $(DOCDIR)/$(TEXDIR)/refman.pdf $(DOCDIR)
-@rm Doxyfile
-@echo 'Generated application internal documentation.'

doc-clean:
-@rm -r $(DOCDIR)/$(TEXDIR)

$(DOCDIR):
@mkdir -p $(DOCDIR)
-@rm -r $(BUILTDDOCDIR)

# clean entire project directory
.PHONY: clean cleaner
clean:
-@rm -rf $(OBJDIR) $(DOCDIR)
-@rm -rf $(OBJDIR)

cleaner:
-@rm -rf $(OUTDIR)
Expand Down
Loading

0 comments on commit ad28eaa

Please sign in to comment.