Skip to content
Snippets Groups Projects
Commit aeab59d9 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: better error checking

parent 53510fa6
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,14 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
this->SetError("Wrong syntax. A TARGET or OUTPUT must be specified.");
return false;
}
if (source.empty()
&& !target.empty()
&& !output.empty())
{
this->SetError("Wrong syntax. A TARGET and OUTPUT can not both be specified.");
return false;
}
// If source is empty, use the target
if(source.empty() && output.empty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment