forked from replit/polygott
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpp.toml
48 lines (42 loc) · 1.26 KB
/
cpp.toml
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
name = "cpp"
aliases = [
"c++"
]
entrypoint = "main.cpp"
extensions = [
"cpp",
"cc",
]
packages = [
"clang-7",
"clang-format-7"
]
setup = [
"cd /tmp && wget -q https://github.com/cquery-project/cquery/releases/download/v20180302/cquery-v20180302-x86_64-unknown-linux-gnu.tar.xz && tar xf cquery-v20180302-x86_64-unknown-linux-gnu.tar.xz && cd cquery-v20180302-x86_64-unknown-linux-gnu && cp bin/cquery /bin && cp -r lib/* /lib/ && cd /tmp && rm cquery-v20180302-x86_64-unknown-linux-gnu.tar.xz && rm -r cquery-v20180302-x86_64-unknown-linux-gnu",
"update-alternatives --install /usr/bin/clang-format clang-format `which clang-format-7` 100",
]
[compile]
command = [
"clang++-7",
"-pthread",
"-std=c++17",
"-o",
"main"
]
[run]
command = [
"./main"
]
[tests]
[tests.0]
code = "#include <iostream>\n #include <string>\n\n int main() {\n std::string line;\n std::getline(std::cin, line);\n std::cout << line;\n }"
input = "hi\n"
output = "hi"
[tests.hello]
code = "#include <iostream>\nint main() { std::cout << \"hello\" << std::endl; }"
output = "hello\n"
[languageServer]
command = [
"cquery",
"--init={\"progressReportFrequencyMs\": -1,\"cacheDirectory\":\"/tmp/cquery\", \"extraClangArguments\": [\"-std=c++17\", \"-pthread\"]}"
]