-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcpp.sublime-build
executable file
·61 lines (55 loc) · 2.91 KB
/
cpp.sublime-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"cmd": ["g++", "-std=c++14" , "-Wall" , "-Wunused" , "-Wuninitialized", "-Wfloat-equal" , "-Woverflow" , "-Wshadow" , "-Wextra" , "-Wconversion" , "-DABHI" , "$file", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++, source.cxx, source.cpp",
"variants":
[
{
"name": "Run",
"shell": true,
"cmd": ["gnome-terminal -- bash -c \"${file_path}/${file_base_name};echo;echo; echo Press ENTER to continue; read line;exit; exec bash\""]
},
{
"name": "compile",
"cmd": ["g++-7", "${file}", "-o", "${file_path}/${file_base_name}", "-Wall", "-Wextra", "-pedantic", "-Wshadow",
"-Wformat=2", "-std=c++17", "-O2", "-D_GLIBCXX_DEBUG", "-D_GLIBCXX_DEBUG_PEDANTIC","-fsanitize=address", "-fsanitize=undefined", "-fno-sanitize-recover", "-fstack-protector","-DABHI"]
},
{
"name": "c++17 compile",
"cmd": ["g++", "-std=c++17" , "-O2" , "-Wall" , "-Wunused" , "-Wuninitialized" , "-pedantic" , "-Wfloat-equal" , "-Woverflow" , "-Wshadow" , "-Wextra" , "-Wconversion" , "-DABHI" , "$file", "-o", "${file_path}/${file_base_name}"]
},
{
"name": "Sanitize",
"cmd": ["g++", "-std=c++17" , "-Wall" , "-Wshadow" , "-DABHI" , "$file", "-o", "${file_path}/${file_base_name}" , "-fsanitize=address" , "-fsanitize=undefined" , "-D_GLIBCXX_DEBUG" , "-g"]
}
]
}
// Uncomment this for earlier versions of linux
// {
// "cmd": ["g++", "-std=c++14" , "-Wall" , "-Wunused" , "-Wuninitialized" , "-Wfloat-equal" , "-Woverflow" , "-Wshadow" , "-Wextra" , "-Wconversion" , "-DABHI" , "$file", "-o", "${file_path}/${file_base_name}"],
// "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
// "working_dir": "${file_path}",
// "selector": "source.c, source.c++, source.cxx, source.cpp",
// "variants":
// [
// {
// "name": "Run",
// "shell": true,
// "cmd": ["gnome-terminal -e 'bash -c \"${file_path}/${file_base_name};echo;echo; echo Press ENTER to continue; read line;exit; exec bash\"'"]
// },
// {
// "name": "Sanitize",
// "cmd": ["g++", "-std=c++17" , "-Wall" , "-Wunused" , "-Wuninitialized" , "-Wfloat-equal" , "-Woverflow" , "-Wshadow" , "-Wextra" , "-Wconversion" , "-DABHI" , "$file", "-o", "${file_path}/${file_base_name}" , "-fsanitize=address" , "-fsanitize=undefined" , "-D_GLIBCXX_DEBUG" , "-g"]
// }
// ]
// }
// { "cmd": ["g++.exe" , "-std=c++14" , "-Wall" , "-Wunused" , "-Wuninitialized" , "-Wfloat-equal" , "-Woverflow" , "-Wshadow" , "-Wextra" , "-Wconversion" , "-DABHI", "-o", "$file_base_name", "$file"],
// "variants": [
// {
// "cmd": ["start", "cmd", "/k", "$file_base_name"],
// "shell": true,
// "name": "Run"
// }
// ]
// }