Skip to content
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

Why Ninja outputs no colors but make does using the same CMakeLists.txt #1984

Closed
c02y opened this issue Jun 13, 2021 · 1 comment
Closed

Comments

@c02y
Copy link

c02y commented Jun 13, 2021

I'm using the same CMakeLists.txt, when I set Unix Makefiles which is the default value for CMAKE_GENERATOR variable, if there are errors in the source code, make will print colors for the "error" keyword and the related lines in the terminal, but when I set CMAKE_GENERATOR Ninja, ninja will not output any color for the "error" keyword and related lines( red for the "FAILED" line at the beginning of the output though).

#814 says I have to add

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")

to make ninja output color and it works.

Since make doesn't need this line, is it able to make ninja output colors by default (use an option if you need to disable colors)

Is it a bug?

FYI:
ninja v1.10.2

@jhasse
Copy link
Collaborator

jhasse commented Jun 15, 2021

@jhasse jhasse closed this as completed Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants