Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to remove all this complex code and instead simply do:
and then remove the
logic below.
See also this comment for details: #78250 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So with COMMAND_ERROR_IS_FATAL, cmake only prints the output on failure? Or will will always prints the output no matter what with your proposed change?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will print any output on standard error regardless of the error code.
Basically:
Flag has no relation / impact on standard out or standard error.
ERROR_OUTPUT, will print any message from standard error in the normal CMake output.Just like we are doing with
message(... "... ${stderr}").See: https://cmake.org/cmake/help/latest/command/execute_process.html
Note:
OUTPUT_QUIETdiscard only standard out, not standard error.