forked from Golovanov399/install-things
-
Notifications
You must be signed in to change notification settings - Fork 0
/
C++ Single File.sublime-build
38 lines (32 loc) · 2.1 KB
/
C++ Single File.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
// precompile
// g++ -DLOCAL -std=c++17 -g -O0 -D_GLIBCXX_DEBUG -Wall -Wextra -x c++-header /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h -o ~/misc/precompiled-headers/Debug/bits/stdc++.h.gch
// g++ -DLOCAL -std=c++17 -O2 -Wno-unused-result -x c++-header /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h -o ~/misc/precompiled-headers/Release/bits/stdc++.h.gch
{
"shell_cmd": "g++ -DLOCAL -I/home/golovanov/misc/precompiled-headers/Debug -std=c++17 -g -O0 -D_GLIBCXX_DEBUG -Wall -Wextra \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Compile & run",
"shell_cmd": "g++ -DLOCAL -I/home/golovanov/misc/precompiled-headers/Debug -std=c++17 -g -O0 -D_GLIBCXX_DEBUG -Wall -Wextra \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
},
{
"name": "Compile & run in terminal",
"shell_cmd": "g++ -DLOCAL -I/home/golovanov/misc/precompiled-headers/Debug -std=c++17 -g -O0 -D_GLIBCXX_DEBUG -Wall -Wextra \"${file}\" -o \"${file_path}/${file_base_name}\" && xterm -fa \"Monospace\" -fs 12 -e 'bash -c \"${file_path}/${file_base_name}; echo; echo Press any key to continue...; read -n 1 -s\"' > /dev/null",
},
{
"name": "Release compile",
"shell_cmd": "g++ -DLOCAL -I/home/golovanov/misc/precompiled-headers/Release -std=c++17 -O2 -Wno-unused-result \"${file}\" -o \"${file_path}/${file_base_name}\""
},
{
"name": "Release compile & run",
"shell_cmd": "g++ -DLOCAL -I/home/golovanov/misc/precompiled-headers/Release -std=c++17 -O2 -Wno-unused-result \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
},
{
"name": "Release compile & run in terminal",
"shell_cmd": "g++ -DLOCAL -I/home/golovanov/misc/precompiled-headers/Release -std=c++17 -O2 -Wno-unused-result \"${file}\" -o \"${file_path}/${file_base_name}\" && xterm -fa \"Monospace\" -fs 12 -e 'bash -c \"${file_path}/${file_base_name}; echo; echo Press any key to continue...; read -n 1 -s\"' > /dev/null",
},
]
}