Browse Source

Support both GCC and Clang for C++

pull/6/head
Menci 6 years ago
parent
commit
af4cc1cdeb
  1. 4
      config-example.json
  2. 16
      language-config.json
  3. 2
      views/problem.ejs
  4. 2
      views/submissions.ejs

4
config-example.json

@ -69,6 +69,8 @@
"cpp", "cpp",
"cpp11", "cpp11",
"cpp17", "cpp17",
"cpp11-clang",
"cpp17-clang",
"csharp", "csharp",
"c", "c",
"java", "java",
@ -83,6 +85,8 @@
"cpp", "cpp",
"cpp11", "cpp11",
"cpp17", "cpp17",
"cpp11-clang",
"cpp17-clang",
"csharp", "csharp",
"c", "c",
"java", "java",

16
language-config.json

@ -2,18 +2,30 @@
"cpp": { "cpp": {
"show": "C++", "show": "C++",
"highlight": "cpp", "highlight": "cpp",
"version": "Clang 7.0.1", "version": "GCC 8.2.0",
"editor": "c_cpp" "editor": "c_cpp"
}, },
"cpp11": { "cpp11": {
"show": "C++ 11", "show": "C++ 11",
"highlight": "cpp", "highlight": "cpp",
"version": "Clang 7.0.1", "version": "GCC 8.2.0",
"editor": "c_cpp" "editor": "c_cpp"
}, },
"cpp17": { "cpp17": {
"show": "C++ 17", "show": "C++ 17",
"highlight": "cpp", "highlight": "cpp",
"version": "GCC 8.2.0",
"editor": "c_cpp"
},
"cpp11-clang": {
"show": "C++ 11 (Clang)",
"highlight": "cpp",
"version": "Clang 7.0.1",
"editor": "c_cpp"
},
"cpp17-clang": {
"show": "C++ 17 (Clang)",
"highlight": "cpp",
"version": "Clang 7.0.1", "version": "Clang 7.0.1",
"editor": "c_cpp" "editor": "c_cpp"
}, },

2
views/problem.ejs

@ -310,7 +310,7 @@ div[class*=ace_br] {
<div class="four wide column" style="margin-right: -25px; "> <div class="four wide column" style="margin-right: -25px; ">
<div class="ui attached vertical fluid pointing menu" id="languages-menu" style="height: 370px; overflow-y: scroll; overflow-x: hidden; "> <div class="ui attached vertical fluid pointing menu" id="languages-menu" style="height: 370px; overflow-y: scroll; overflow-x: hidden; ">
<% <%
let language = syzoj.config.enabled_languages;; let language = syzoj.config.enabled_languages;
if (state) { if (state) {
language = state.language; language = state.language;
} else if (lastLanguage) language = lastLanguage; } else if (lastLanguage) language = lastLanguage;

2
views/submissions.ejs

@ -39,7 +39,7 @@
<div class="item" data-value=""><b>不限</b></div> <div class="item" data-value=""><b>不限</b></div>
<div class="item" data-value="submit-answer"><b>提交答案</b></div> <div class="item" data-value="submit-answer"><b>提交答案</b></div>
<% for (let lang of syzoj.config.filter_enabled_languages) { %> <% for (let lang of syzoj.config.filter_enabled_languages) { %>
<div class="item" data-value="<%= lang %>"><b><%= syzoj.languages[lang].show %></b></div> <div style="font-size: 12.5px; " class="item" data-value="<%= lang %>"><b><%= syzoj.languages[lang].show %></b></div>
<% } %> <% } %>
</div> </div>
</div> </div>

Loading…
Cancel
Save