Optionaloptions: { cppStandard?: string; onlineJudge?: boolean } = {}
Compilation overrides
OptionalcppStandard?: stringStandard to use instead of the one
from Config.json
OptionalonlineJudge?: booleanDefine ONLINE_JUDGE
Optionalconfig: CompilerConfig = ...
Checked compiler block; read from
Config.json when omitted
Flags in order (not shell-quoted)
Builds the full list of C++ compile flags:
-O2,-std=<cppStandard>, then every item ofcompiler.flags. A user flag replaces the matching default instead of being added next to it:-std=(or--std=) flag replaces-std=<cppStandard>,-Oflag (-O0,-O3,-Ofast, ...) replaces-O2. So the command never has two different-std=or-Oflags. WithonlineJudge(solutions only),-DONLINE_JUDGEis added after the standard, unlesscompiler.flagsalready definesONLINE_JUDGE.