Commit c4a5ca1e authored by Michaël Roynard's avatar Michaël Roynard
Browse files

Initial commit

parents
Pipeline #1886 passed with stage
in 31 seconds
BasedOnStyle: LLVM
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
# BreakBeforeBraces: Linux
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterStruct: false
AfterUnion: false
# AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 120
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
FixNamespaceComments: true
# IncludeBlocks: Preserve
IndentCaseLabels: true
# IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
DerivePointerAlignment: false
PointerAlignment: Left
SortUsingDeclarations: true
SortIncludes: true
ReflowComments: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpacesInSquareBrackets: false
SpacesInContainerLiterals: false
SpacesInAngles: false
SpacesBeforeTrailingComments: 1
SpaceInEmptyParentheses: false
\ No newline at end of file
# Driver
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
# Language
-xc++
-std=gnu++1z
-Wall
-Wextra
-Werror
-pedantic
# Includes
-I../include
-isystem /usr/local/include
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
\ No newline at end of file
/build*
/cmake-build-*
/qt-creator
.vs
.idea
compile_commands.json
.DS_Store
.vscode/cquery_*
CMakeLists.txt.user
\ No newline at end of file
variables:
CC: "gcc" # eg. gcc or clang
CXX: "g++" # eg. g++ or clang++
CMAKE_GENERATOR: "-G Ninja" # include -G if defined
BUILD_DIRECTORY: "build-in-docker" # build directory name
SOURCE_DIRECTORY: ".." # where cmake search source files from the build directory
TARGET: "check" # target to invoke
CLEAN: "OFF" # whether to rm -rf * in build directory before running cmake
TESTS: "ON" # build and run unit tests
stages:
- build
- doc
.job-basic-build-linux: &distcheck-basic-linux
stage: build
image: mroynard/ubuntu-toolset:stable
script:
- set -e
- export CC=$CC
- export CXX=$CXX
- $CXX --version
- mkdir -p $BUILD_DIRECTORY
- cd $BUILD_DIRECTORY
- if [ "$CLEAN" == "ON" ]; then rm -rf ./*; fi
- cmake $CMAKE_GENERATOR
-DWITH_TESTS=$TESTS
$SOURCE_DIRECTORY
- cmake --build .
--target $TARGET
--config $RELEASE_TYPE
distcheck-linux-gcc-release:
<<: *distcheck-basic-linux
variables:
RELEASE_TYPE: "Release"
CC: "gcc"
CXX: "g++"
distcheck-linux-clang-release:
<<: *distcheck-basic-linux
variables:
RELEASE_TYPE: "Release"
CC: "clang"
CXX: "clang++"
distcheck-linux-gcc-debug:
<<: *distcheck-basic-linux
variables:
RELEASE_TYPE: "Debug"
CC: "gcc"
CXX: "g++"
distcheck-linux-clang-debug:
<<: *distcheck-basic-linux
variables:
RELEASE_TYPE: "Debug"
CC: "clang"
CXX: "clang++"
{
"variant": null,
"activeEnvironments": [
"Visual Studio Community 2017 - amd64"
],
"codeModel": null
}
\ No newline at end of file
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceRoot}/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceRoot}/include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17"
},
{
"name": "Linux",
"includePath": [
"/usr/include/clang/6.0.0/include",
"/usr/include",
"/usr/local/include",
"/usr/local/include/c++/v1",
"/usr/include/c++/6.3.0",
"/usr/include/c++/6.3.0/backward",
"/usr/include/x86_64-linux-gnu/c++/6.3.0",
"/usr/include/x86_64-linux-gnu",
"/usr/include/x86_64-linux-gnu/C++/6",
"/usr/lib/gcc/x86_64-linux-gnu/6/include",
"/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"${workspaceRoot}",
"${workspaceRoot}/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include/clang/6.0.0/include",
"/usr/include",
"/usr/local/include",
"/usr/local/include/c++/v1",
"/usr/include/c++/6.3.0",
"/usr/include/c++/6.3.0/backward",
"/usr/include/x86_64-linux-gnu/c++/6.3.0",
"/usr/include/x86_64-linux-gnu",
"/usr/include/x86_64-linux-gnu/C++/6",
"/usr/lib/gcc/x86_64-linux-gnu/6/include",
"/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"${workspaceRoot}",
"${workspaceRoot}/include"
],
"databaseFilename": "",
"limitSymbolsToIncludedHeaders": true
},
"compilerPath": "/usr/bin/clang++-6.0",
"cStandard": "c11",
"cppStandard": "c++17"
},
{
"name": "Win32",
"includePath": [
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
"${workspaceRoot}",
"${workspaceRoot}/include"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
"${workspaceRoot}",
"${workspaceRoot}/include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17",
"compilerPath": "/usr/bin/clang"
}
],
"version": 4
}
\ No newline at end of file
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceRoot}/<your program>",
"args": [],
"cwd": "${workspaceRoot}"
}
]
}
\ No newline at end of file
{
"cSpell.enabledLanguageIds": [
"c",
"cpp",
"csharp",
"go",
"handlebars",
"javascript",
"javascriptreact",
"json",
"markdown",
"php",
"plaintext",
"python",
"restructuredtext",
"text",
"typescript",
"typescriptreact",
"yml"
],
"cSpell.language": "en,en-GB,en-US,fr-FR,fr",
"cSpell.enabled": true,
"C_Cpp.intelliSenseEngineFallback": "Disabled",
"files.associations": {
"functional": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"xmemory0": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp",
"xutility": "cpp",
"string_view": "cpp",
"chrono": "cpp",
"__config": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"exception": "cpp",
"optional": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ratio": "cpp",
"stdexcept": "cpp",
"system_error": "cpp",
"thread": "cpp",
"typeinfo": "cpp",
"codecvt": "cpp",
"algorithm": "cpp",
"__nullptr": "cpp"
}
}
\ No newline at end of file
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"echoCommand": true,
"tasks": [
{
"label": "clean",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build"
},
"args": [
"-rf",
"*"
],
"command": "rm",
"group": "none"
},
{
"label": "configure-with-cdb",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build"
},
"args": [
"-G",
"Ninja",
"..",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
],
"command": "cmake",
"group": "build"
},
{
"label": "build-debug-all",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build"
},
"dependsOn": "configure-with-cdb",
"args": [
"--build",
".",
"--target",
"check",
"--config",
"Debug"
],
"command": "cmake",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note|info):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "build-release-all",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build"
},
"dependsOn": "configure-with-cdb",
"args": [
"--build",
".",
"--target",
"check",
"--config",
"Release"
],
"command": "cmake",
"group": "build",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note|info):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "configure-gcc-with-cdb",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build-gcc",
"env": {
"CC": "gcc-7",
"CXX": "gcc-7",
}
},
"args": [
"cmake",
"-G",
"Ninja",
"..",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
],
// needs to remove /opt/local/bin from PATH...
"command": "PATH=/opt/local/libexec/gnubin:/opt/local/sbin:/opt/local/libexec/gnubin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/git/bin:/Users/dutiona/.dotfiles/bin:/Users/dutiona/.local/bin:/Users/dutiona/.local/sbin",
"group": "build"
},
{
"label": "build-gcc-debug-all",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build-gcc"
},
"dependsOn": "configure-gcc-with-cdb",
"args": [
"cmake",
"--build",
".",
"--target",
"check",
"--config",
"Debug"
],
"command": "PATH=/opt/local/libexec/gnubin:/opt/local/sbin:/opt/local/libexec/gnubin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/git/bin:/Users/dutiona/.dotfiles/bin:/Users/dutiona/.local/bin:/Users/dutiona/.local/sbin",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note|info):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "build-gcc-release-all",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build-gcc"
},
"dependsOn": "configure-gcc-with-cdb",
"args": [
"cmake",
"--build",
".",
"--target",
"check",
"--config",
"Release"
],
"command": "PATH=/opt/local/libexec/gnubin:/opt/local/sbin:/opt/local/libexec/gnubin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/git/bin:/Users/dutiona/.dotfiles/bin:/Users/dutiona/.local/bin:/Users/dutiona/.local/sbin",
"group": "build",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note|info):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "clang-format-current",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}"
},
"args": [
"-i",
"-style=file",
"${relativeFile}"
],
"command": "/usr/bin/clang-format-6.0",
"group": "none"
},
{
"label": "clang-tidy-current",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}"
},
"args": [
"-header-filter=\".*\"",
"-export-fixes=\"build/clang-tidy-current.fixes\"",
"-p",
"build",
"${file}"
],
"dependsOn": "configure-with-cdb",
"command": "/usr/bin/clang-tidy-6.0",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note|info):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"group": "none"
},
{
"label": "clang-tidy-patch-current",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}"
},
"args": [
"-header-filter=\".*\"",
"-fix-errors",
"-p",
"build",
"${file}"
],
"dependsOn": "configure-with-cdb",
"command": "clang-tidy",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note|info):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"group": "none"
},
{
"label": "clang-tidy-all",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}"
},
"dependsOn": "configure-with-cdb",
"command": "clang-tidy -header-filter=\".*\" -export-fixes=\"build/clang-tidy-all.fixes\" -p build $(cat build/compile_commands.json | jq \".[].file\" | tr -d '\"' | tr '\\n' ' ')",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",</