Commit c60557e9 authored by Peter Kuemmel's avatar Peter Kuemmel

Ninja: don't break because of empty commands

parent 128fe5d5
......@@ -225,10 +225,17 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
const cmNinjaDeps& deps,
const cmNinjaDeps& orderOnlyDeps)
{
std::string cmd = command;
#ifdef _WIN32
if (cmd.empty())
// TODO Shouldn't an empty command be handled by ninja?
cmd = "cmd.exe /c";
#endif
this->AddCustomCommandRule();
cmNinjaVars vars;
vars["COMMAND"] = command;
vars["COMMAND"] = cmd;
vars["DESC"] = EncodeLiteral(description);
cmGlobalNinjaGenerator::WriteBuild(*this->BuildFileStream,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment