Skip to content

Commit 25eddc4

Browse files
Initial commit
0 parents  commit 25eddc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+22111
-0
lines changed

.bazelrc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Address sanitizer configuration.
2+
# ASAN_SYMBOLIZER_PATH=/usr/local/Cellar/llvm/13.0.0_1/bin/llvm-symbolizer
3+
4+
# Address sanitizer config
5+
# Use with bazel run --config=asan or lsan
6+
build:asan --strip=never
7+
build:asan --copt -fsanitize=address
8+
build:asan --copt -DADDRESS_SANITIZER
9+
build:asan --copt -O0
10+
build:asan --copt -g
11+
build:asan --copt -fno-omit-frame-pointer
12+
build:asan --linkopt -fsanitize=address
13+
build:asan --sandbox_debug
14+
build:asan --spawn_strategy=standalone
15+
16+
# undefined behavior sanitizer config
17+
build:ubsan --strip=never
18+
build:ubsan --copt -fsanitize=undefined
19+
build:ubsan --copt -DADDRESS_SANITIZER
20+
build:ubsan --copt -O0
21+
build:ubsan --copt -g
22+
build:ubsan --copt -fno-omit-frame-pointer
23+
build:ubsan --linkopt -fsanitize=undefined
24+
build:ubsan --sandbox_debug
25+
build:ubsan --spawn_strategy=standalone

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/bazel-Bazel_with_GTest
2+
/bazel-bin
3+
/bazel-genfiles
4+
/bazel-out
5+
/bazel-testlogs
6+
/bazel-template
7+
/bazel-*
8+
/opencv
9+
.DS_Store
10+
.idea

.vscode/c_cpp_properties.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceFolder}/src/lib",
7+
"${workspaceFolder}/src/lib/*",
8+
"/usr/local/include",
9+
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/",
10+
"${workspaceFolder}/opencv/install/include/opencv4",
11+
"${workspaceFolder}"
12+
]
13+
}
14+
],
15+
"version": 4
16+
}

.vscode/extensions.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": [
7+
8+
],
9+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
10+
"unwantedRecommendations": [
11+
12+
]
13+
}

.vscode/launch.json

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "(lldb) Launch Run",
9+
"preLaunchTask": "Bazel Build (Run)",
10+
"type": "cppdbg",
11+
"request": "launch",
12+
"program": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}",
13+
"args": [],
14+
"stopAtEntry": false,
15+
"cwd": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}.runfiles/__main__",
16+
"environment": [],
17+
"externalConsole": false,
18+
"MIMode": "lldb"
19+
},
20+
{
21+
"name": "(lldb) Launch Run Opt",
22+
"preLaunchTask": "Bazel Build (Run Opt)",
23+
"type": "cppdbg",
24+
"request": "launch",
25+
"program": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}",
26+
"args": [],
27+
"stopAtEntry": false,
28+
"cwd": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}.runfiles/__main__",
29+
"environment": [],
30+
"externalConsole": false,
31+
"MIMode": "lldb"
32+
},
33+
{
34+
"name": "(lldb) Launch Debug",
35+
"preLaunchTask": "Bazel Build (Debug)",
36+
"type": "cppdbg",
37+
"request": "launch",
38+
"program": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}",
39+
"args": [],
40+
"stopAtEntry": false,
41+
"cwd": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}.runfiles/__main__",
42+
"environment": [],
43+
"externalConsole": false,
44+
"MIMode": "lldb"
45+
},
46+
{
47+
"preLaunchTask": "Bazel Build (Debug)",
48+
"name": "CodeLLDB",
49+
"type": "lldb",
50+
"request": "launch",
51+
"program": "${workspaceFolder}/bazel-bin/src/main/${fileBasenameNoExtension}",
52+
"args": [],
53+
54+
"sourceMap": {
55+
".": "${workspaceFolder}/"
56+
},
57+
},
58+
{
59+
"name": "Linux: g++ build and debug active file",
60+
"type": "cppdbg",
61+
"request": "launch",
62+
"program": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}",
63+
"args": [],
64+
"stopAtEntry": false,
65+
"cwd": "${workspaceFolder}",
66+
"environment": [],
67+
"externalConsole": false,
68+
"MIMode": "gdb",
69+
"setupCommands": [
70+
{
71+
"description": "Enable pretty-printing for gdb",
72+
"text": "-enable-pretty-printing",
73+
"ignoreFailures": true
74+
}
75+
],
76+
"preLaunchTask": "Bazel Build (Debug)",
77+
"miDebuggerPath": "/usr/bin/gdb"
78+
}
79+
]
80+
}

.vscode/settings.json

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"files.associations": {
3+
"string": "cpp",
4+
"filesystem": "cpp",
5+
"iosfwd": "cpp",
6+
"__bit_reference": "cpp",
7+
"__config": "cpp",
8+
"__debug": "cpp",
9+
"__errc": "cpp",
10+
"__functional_base": "cpp",
11+
"__hash_table": "cpp",
12+
"__locale": "cpp",
13+
"__mutex_base": "cpp",
14+
"__node_handle": "cpp",
15+
"__nullptr": "cpp",
16+
"__split_buffer": "cpp",
17+
"__string": "cpp",
18+
"__threading_support": "cpp",
19+
"__tree": "cpp",
20+
"__tuple": "cpp",
21+
"algorithm": "cpp",
22+
"array": "cpp",
23+
"atomic": "cpp",
24+
"bit": "cpp",
25+
"bitset": "cpp",
26+
"cctype": "cpp",
27+
"chrono": "cpp",
28+
"cinttypes": "cpp",
29+
"cmath": "cpp",
30+
"complex": "cpp",
31+
"cstdarg": "cpp",
32+
"cstddef": "cpp",
33+
"cstdint": "cpp",
34+
"cstdio": "cpp",
35+
"cstdlib": "cpp",
36+
"cstring": "cpp",
37+
"ctime": "cpp",
38+
"cwchar": "cpp",
39+
"cwctype": "cpp",
40+
"deque": "cpp",
41+
"exception": "cpp",
42+
"fstream": "cpp",
43+
"functional": "cpp",
44+
"initializer_list": "cpp",
45+
"iomanip": "cpp",
46+
"ios": "cpp",
47+
"iostream": "cpp",
48+
"istream": "cpp",
49+
"iterator": "cpp",
50+
"limits": "cpp",
51+
"locale": "cpp",
52+
"map": "cpp",
53+
"memory": "cpp",
54+
"mutex": "cpp",
55+
"new": "cpp",
56+
"optional": "cpp",
57+
"ostream": "cpp",
58+
"ratio": "cpp",
59+
"set": "cpp",
60+
"sstream": "cpp",
61+
"stack": "cpp",
62+
"stdexcept": "cpp",
63+
"streambuf": "cpp",
64+
"string_view": "cpp",
65+
"system_error": "cpp",
66+
"thread": "cpp",
67+
"tuple": "cpp",
68+
"type_traits": "cpp",
69+
"typeinfo": "cpp",
70+
"unordered_map": "cpp",
71+
"utility": "cpp",
72+
"vector": "cpp",
73+
"codecvt": "cpp",
74+
"condition_variable": "cpp",
75+
"list": "cpp",
76+
"numeric": "cpp",
77+
"random": "cpp",
78+
"regex": "cpp",
79+
"unordered_set": "cpp",
80+
"hash_map": "cpp",
81+
"hash_set": "cpp",
82+
"future": "cpp",
83+
"forward_list": "cpp",
84+
"queue": "cpp",
85+
"clocale": "cpp",
86+
"compare": "cpp",
87+
"concepts": "cpp",
88+
"numbers": "cpp",
89+
"semaphore": "cpp",
90+
"typeindex": "cpp",
91+
"__bits": "cpp",
92+
"*.tcc": "cpp",
93+
"memory_resource": "cpp",
94+
"stop_token": "cpp",
95+
"cfloat": "cpp"
96+
},
97+
"lldb.displayFormat": "auto",
98+
"lldb.dereferencePointers": true,
99+
"lldb.showDisassembly": "auto",
100+
}

.vscode/tasks.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Modified to enable debugging using bazel
2+
{
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"label": "Bazel Build (Debug)",
7+
"type": "shell",
8+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} -c dbg",
9+
"windows": {
10+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} --experimental_enable_runfiles -c dbg"
11+
},
12+
"osx": {
13+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} -c dbg --spawn_strategy=local",
14+
},
15+
"group": {
16+
"kind": "build",
17+
"isDefault": true
18+
},
19+
},
20+
{
21+
"label": "Bazel Build (Run)",
22+
"type": "shell",
23+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension}",
24+
"windows": {
25+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension}"
26+
},
27+
"osx": {
28+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension}",
29+
},
30+
"group": {
31+
"kind": "build",
32+
"isDefault": true
33+
},
34+
},
35+
{
36+
"label": "Bazel Build (Run Opt)",
37+
"type": "shell",
38+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} -c opt",
39+
"windows": {
40+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} -c opt"
41+
},
42+
"osx": {
43+
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} -c opt",
44+
},
45+
"group": {
46+
"kind": "build",
47+
"isDefault": true
48+
},
49+
}
50+
]
51+
}

0 commit comments

Comments
 (0)