diff options
author | Juan Ramos <juan.ramos@kitware.com> | 2024-05-15 20:58:47 (GMT) |
---|---|---|
committer | Juan Ramos <juan.ramos@kitware.com> | 2024-05-16 16:00:30 (GMT) |
commit | f9028379f727c3134edf287ab8836358fd4bd5e9 (patch) | |
tree | 8ebbcf8ae1399be783d5c6885d1d2bee96caeeca /Source/cmAddCustomCommandCommand.cxx | |
parent | 96028ad95c21029a261d49de5a788f385e18c380 (diff) | |
download | CMake-f9028379f727c3134edf287ab8836358fd4bd5e9.zip CMake-f9028379f727c3134edf287ab8836358fd4bd5e9.tar.gz CMake-f9028379f727c3134edf287ab8836358fd4bd5e9.tar.bz2 |
cmAddCustomCommandCommand: Move SOURCE signature error messages
Helps readability of the code. All the SOURCE signature code is
in the else statement.
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index ea97287..d943011 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -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; |