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

Merged
merged 1 commit into from
Jan 17, 2025

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

Copy link
Collaborator Author

@microbit-carlos microbit-carlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was reviewed in call on the 17th of December and ready to be merged.
Also raised in upstream CODAL:

@microbit-carlos microbit-carlos merged commit 893d446 into master Jan 17, 2025
27 checks passed
@microbit-carlos microbit-carlos deleted the ninja-colours branch January 17, 2025 18:06
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