ENH: better error checking
This commit is contained in:
parent
53510fa603
commit
aeab59d9e7
|
@ -150,6 +150,14 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
|
|||
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())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue