Skip to content

Commit

Permalink
CMake: Add option (v3.24+) to force Ninja output to be coloured.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Dec 13, 2024
1 parent 14f2f7b commit ee04444
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/cmake/colours.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ if(NOT WIN32)
set(BoldCyan "${Esc}[1;36m")
set(BoldWhite "${Esc}[1;37m")
endif()

# Ninja builds are not coloured, compilers detect their output being piped and
# remove it. This makes CMake > 3.24 add extra compiler flags to force colour
# and has no effect on older CMake versions
set(CMAKE_COLOR_DIAGNOSTICS On)

0 comments on commit ee04444

Please sign in to comment.