-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feat:Termcolor #221
base: main
Are you sure you want to change the base?
Feat:Termcolor #221
Conversation
Hello Mr. @jviotti, I am using clang-format to format the code, but the workflow still fails. Could you please guide me? |
Hey @Pavankumar07s, does this PR take over #199? Can we close that one if so?
How are you installing and running Also note that we run I always run it with |
${CMAKE_CURRENT_LIST_DIR}/../vendor/termcolor/include) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(TermColor |
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.
What is this for?
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.
Mr. @jviotti, as you suggested, termcolor has its own CMake file, and I need to create this file to use it. I researched and came up with this approach.
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.
See https://github.com/sourcemeta/jsonschema/pull/221/files#r1941593287. I think you are doing it the hard way
vendor/termcolor/.mailmap
Outdated
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.
Can you mask all of the files that are not essential for the build? See https://github.com/sourcemeta/vendorpull?tab=readme-ov-file#masking
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.
Alright Mr @jviotti
Looking better. Can you also implement a couple of tests cases showing the color escaping codes taking effect, and also the "no color" option doing the right thing? |
Alright Mr @jviotti |
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.
This is overly complicated and not following the same conventions we have in other Find*
files. Plus it's using the _FOUND
suffixes that CMake actually expects, relying on targets instead. This works for me and it is pretty much exactly the same as with other dependencies:
if(NOT TermColor_FOUND)
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/termcolor")
set(TermColor_FOUND ON)
endif()
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.
Yes changing to this way.
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.
This seems like an unrelated change?
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.
Let's mask all of these files!
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.
Ohhk sir , reading the docs.
Maybe to simplify things, you can first send a PR integrating |
What kind of change does this PR introduce?
Feature: 1.Added termcolor
2. just colored the version
3.used parse_options helper function to avoid re-parsing command line arguments.
4. added short version -n for --no-color
Issue Number:
Closes #1
Screenshots/videos: