initial commit for new repo

This commit is contained in:
Phuntsok Drak-pa
2019-07-21 03:27:31 +02:00
commit de542b3e97
80 changed files with 17176 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
---
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
AlignEscapedNewlines: Left
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false'
AlwaysBreakTemplateDeclarations: 'true'
BinPackArguments: 'true'
BinPackParameters: 'true'
BreakAfterJavaFieldAnnotations: 'true'
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Linux
BreakBeforeInheritanceComma: 'false'
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: BeforeColon
BreakStringLiterals: 'true'
ColumnLimit: '80'
CompactNamespaces: 'false'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
Cpp11BracedListStyle: 'true'
FixNamespaceComments: 'true'
IncludeBlocks: Regroup
IndentCaseLabels: 'false'
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: 'false'
JavaScriptQuotes: Leave
JavaScriptWrapImports: 'true'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
Language: Cpp
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: Inner
PointerAlignment: Right
ReflowComments: 'true'
SortIncludes: 'true'
SortUsingDeclarations: 'true'
SpaceAfterCStyleCast: 'false'
SpaceAfterTemplateKeyword: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: '2'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Cpp11
UseTab: ForIndentation
...

4
dev/templateC++/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
bin
build
debug
!.gitignore

View File

@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project("PROJECTNAME")
set(TGT "PROJECTNAME")
set(${TGT}_VERSION_MAJOR 0)
set(${TGT}_VERSION_MINOR 1)
set(CXX_COVERAGE_COMPILE_FLAGS "-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wsign-conversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline -Wunused -Wnon-virtual-dtor")
set(CMAKE_CXX_FLAGS_DEBUG "${CXX_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg")
set(CMAKE_CXX_FLAGS_RELEASE "${CXX_COVERAGE_COMPILE_FLAGS} -O3 -flto")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "../debug/")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}")
include_directories(include)
file(GLOB SOURCES "src/*.cc")
add_executable(${TGT} ${SOURCES})

12
dev/templateC++/Makefile Normal file
View File

@@ -0,0 +1,12 @@
release:
@mkdir -p build bin
@cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
debug:
@mkdir -p build debug
@cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
clean:
@rm -rf bin
@rm -rf build
@rm -rf debug

View File

@@ -0,0 +1,14 @@
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
* PROJECTNAME
PROJECTNAME is a C++17 project written for and built with CMake.
* How to build PROJECTNAME
You can directly run either ~make~ or ~make release~ to compile the release
version of the binaries which will be generated in ~bin/~. If you wish to
compile its debug version instead, run ~make debug~ to generate the binaries in
the ~debug/~ directory. Once you have ran ~make~ at the root of the project, you
can recompile the project from the ~build/~ directory if you wish to avoid to
re-run CMake.

2495
dev/templateC++/doc/Doxyfile Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
#include <iostream>
int main(int argc, char* argv[]) {
std::cout << "Hello World!" << std::endl;
return 0;
}