mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmAddCustomCommandCommand: Move SOURCE signature error messages
Helps readability of the code. All the SOURCE signature code is in the else statement.
This commit is contained in:
@@ -357,13 +357,18 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
|
||||
cc->SetDepends(depends);
|
||||
cc->SetImplicitDepends(implicit_depends);
|
||||
mf.AddCustomCommandToOutput(std::move(cc));
|
||||
} else if (!byproducts.empty()) {
|
||||
status.SetError("BYPRODUCTS may not be specified with SOURCE signatures");
|
||||
return false;
|
||||
} else if (uses_terminal) {
|
||||
status.SetError("USES_TERMINAL may not be used with SOURCE signatures");
|
||||
return false;
|
||||
} else {
|
||||
if (!byproducts.empty()) {
|
||||
status.SetError(
|
||||
"BYPRODUCTS may not be specified with SOURCE signatures");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (uses_terminal) {
|
||||
status.SetError("USES_TERMINAL may not be used with SOURCE signatures");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool issueMessage = true;
|
||||
std::ostringstream e;
|
||||
MessageType messageType = MessageType::AUTHOR_WARNING;
|
||||
|
||||
Reference in New Issue
Block a user