Path to the .cpp / .cc / .cxx source file
Optionaloptions: { cppStandard?: string } = {}Compilation overrides
OptionalcppStandard?: stringStandard to pass as -std=; when
omitted it is resolved from Config.json
Resolves once the executable is written next to the source (same path, extension stripped)
Compiles a C++ source file using g++. Uses -O2 optimization and the C++ standard from
Config.json(cppStandard, default C++23). The problem root (current working directory) is added as a quoted-include search path so sources in subdirectories can#include "testlib.h". Goes through the compilation cache: when the source, its local headers, the flags, and the compiler are unchanged, the cached binary is restored and g++ is not run. A testlib program is compiled against a declarations-only testlib and linked with testlib compiled once per problem (seeprebuilt-testlib.ts), falling back to the original header.