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

CMake: Add option (v3.24+) to force Ninja output to be coloured. #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

microbit-carlos
Copy link
Collaborator

Ninja builds are not coloured, ninja internally pipes the compiler output, which the compilers detect and remove the text formatting:
https://github.com/ninja-build/ninja/wiki/FAQ#why-does-my-program-with-colored-output-not-have-color-under-ninja

This option makes CMake > 3.24 add extra compiler flags to force colour and has no effect on older CMake versions.

Before:
Screenshot 2024-12-13 at 18 51 51

After:
Screenshot 2024-12-13 at 18 52 40

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

Successfully merging this pull request may close these issues.

1 participant