feat: provide default contest config

This commit is contained in:
Barrett Ruth 2025-09-26 09:15:43 -04:00
parent bf191d7f67
commit b41ed5be13

View file

@ -68,27 +68,20 @@
local M = {} local M = {}
local constants = require('cp.constants') local constants = require('cp.constants')
local default_cpp_config = {
cpp = {
compile = { 'g++', '-std=c++17', '{source}', '-o', '{binary}' },
debug = { 'g++', '-std=c++17', '-fsanitize=address,undefined', '{source}', '-o', '{binary}' },
extension = 'cpp',
},
}
---@type cp.Config ---@type cp.Config
M.defaults = { M.defaults = {
contests = { contests = {
default = { codeforces = default_cpp_config,
cpp = { atcoder = default_cpp_config,
compile = { 'g++', '{source}', '-o', '{binary}', '-std=c++17' }, cses = default_cpp_config,
test = { '{binary}' },
debug = {
'g++',
'{source}',
'-o',
'{binary}',
'-std=c++17',
'-g',
'-fsanitize=address,undefined',
},
},
python = {
test = { 'python3', '{source}' },
},
},
}, },
snippets = {}, snippets = {},
hooks = { hooks = {