-
Notifications
You must be signed in to change notification settings - Fork 0
Add output and logging utils #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, allow provided code to contain multiple values (list form), due to expected semicolons in code.
This was a HUGE issue to locate - the predefined preset was simply NOT defined, for reasons that escape me. A dump() revealed that despite the include_guard(GLOBAL), the output/ansi was somehow included twice, despite the the guard that should prevent it. This made cmake behave really strange!
Useful for a "quick" test / showcase
This caused the "include" issue where the RSP ANSI PRESET list was no longer available, at the time when ANSI was enabled, because (in this case) the "rsp/output" was first included inside the test(s) files, meaning that sequence variables were only define within that file's scope!
Other output util functions will most likely also benefit from this.
This isn't 100%, but at least the colouring is preserved, and some of the double new lines have been removed. There is still a single double line that I was unable to figure out why it is being added.
Also, reformatted some of the log components.
Macro is now slightly more flexible.
The map should allow developers to customise this in any way they wish. Also, added output capture logic.
This allows developers to use UTC timestamps, instead of local
This should improve the formatting, slightly... But still isn't what it should be. Damn message() behaves really strange - cmake's "simple markup language" is NOT very well documented.
Need to make a small macro to help forward calls to log(), or the overhead of boilerplate script would be too much...
Also, added missing TEXT_BLINK_RESTORE property
kernelguy
approved these changes
Feb 5, 2025
Collaborator
kernelguy
left a 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.
Perhaps for next update add possibility to control ansi_(en/dis)able via cmake command line option.
Project will now enable or disable ANSI output, depending on the option. Defaults to false.
Now using the newly added RSP_ENABLE_ANSI option.
kernelguy
approved these changes
Feb 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR adds a few console output utilities. Among them are:
output()function, that acts as a wrapper for cmake'smessage().