-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add colored diagnostics support for GCC (>=4.9) #814
Comments
Actually, I missed an issue that said that this option needs to be forced with
This only works with ninja if I add |
As mentioned there, Ninja knows to strip shell escapes when used via a pipe. It's kind of subtle, I know, but we don't have any better solution... :\ |
Summary: Colored compiler warnings in ninja output only work with the `-fdiagnostics-color=always` flag. See ninja-build/ninja#814 for a rationale. This commit adds such flag in ecm for gcc >= 4.9 and clang >= 3.5, and only if the CMAKE_GENERATOR is Ninja. Test Plan: ninja+gcc and ninja+clang now show nice colored compiler warnings. Reviewers: #frameworks Differential Revision: https://phabricator.kde.org/D3733
We have to force it. Reference: https://public.kitware.com/Bug/view.php?id=15502 ninja-build/ninja#814
We have to force it. Reference: https://public.kitware.com/Bug/view.php?id=15502 ninja-build/ninja#814
The solution used by GCC for years is a better solution than what ninja does (always stripping shell escapes for pipes). Please add a standard 3-way color option: Diagnostics are very difficult to read, particulary where C++ templates are involved. Color is fairly essential. If it is not possible to add this option, can you give me a general idea how I can modify my own ninja instance to support this feature? |
This is something that was made possible with clang (cf. #297), and since GCC finally provides color support (since 4.9), this may be worth supporting as well.
The text was updated successfully, but these errors were encountered: