Files
tmc/tools/asset_processor/util.cpp
T
octorock 91ad7860b2 Improve compilation time of asset_processor
By splitting it up into object files and letting them be compiled in
parallel. Also only rebuild the parts that changed.
2021-11-19 20:58:25 +01:00

21 lines
485 B
C++

#include "util.h"
#include <iostream>
void check_call(const std::vector<std::string>& 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);
}
}