#include "util.h" #include void check_call(const std::vector& cmd) { std::string cmdstr; bool first = true; for (const auto& segment : cmd) { if (first) { first = false; } else { cmdstr += " "; } cmdstr += segment; } int code = system(cmdstr.c_str()); if (code != 0) { std::cerr << cmdstr << " failed with return code " << code << std::endl; std::exit(1); } }