Merge topic 'cleanup-custom-command-code'

f9028379f7 cmAddCustomCommandCommand: Move SOURCE signature error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9523
This commit is contained in:
Brad King
2024-05-17 15:13:30 +00:00
committed by Kitware Robot

View File

@@ -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;