~aleteoryx/muditaos

ref: 9a17c5fc3c0cc1be99a90f36b24b363f5ac22c1d muditaos/cmake/modules/Colours.cmake -rw-r--r-- 820 bytes
9a17c5fc — Przemyslaw Brudny [EGD-6676] PhoneLock handling with ServiceDesktop 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
option(COLOR_OUTPUT "Use colored output" ON)
set(CMAKE_COLOR_MAKEFILE ${COLOR_OUTPUT})

if (COLOR_OUTPUT)
	string(ASCII 27 Esc)
	set(ColourReset "${Esc}[m")
	set(ColourBold  "${Esc}[1m")
	set(Red         "${Esc}[31m")
	set(Green       "${Esc}[32m")
	set(Yellow      "${Esc}[33m")
	set(Blue        "${Esc}[34m")
	set(Magenta     "${Esc}[35m")
	set(Cyan        "${Esc}[36m")
	set(White       "${Esc}[37m")
	set(BoldRed     "${Esc}[1;31m")
	set(BoldGreen   "${Esc}[1;32m")
	set(BoldYellow  "${Esc}[1;33m")
	set(BoldBlue    "${Esc}[1;34m")
	set(BoldMagenta "${Esc}[1;35m")
	set(BoldCyan    "${Esc}[1;36m")
	set(BoldWhite   "${Esc}[1;37m")

	set(ORANGE      "${Esc}[38;2;255;100;0m")

	add_compile_options (-fdiagnostics-color=always)
else (COLOR_OUTPUT)
	add_compile_options (-fdiagnostics-color=never)
endif (COLOR_OUTPUT)