Warn against empty machines file

This commit is contained in:
Eelco Dolstra 2016-10-27 20:14:12 +02:00
parent a2be29377e
commit a816ef873d

View file

@ -133,6 +133,12 @@ void State::parseMachines(const std::string & contents)
newMachines[m.first] = machine;
}
static bool warned = false;
if (newMachines.empty() && !warned) {
printError("warning: no build machines are defined");
warned = true;
}
auto machines_(machines.lock());
*machines_ = newMachines;