Debian Codegraph @

cmake/custom_color_messages.cmake

raw
1 # http://stackoverflow.com/a/19578320
2
3 if(NOT WIN32)
4 string(ASCII 27 Esc)
5 set(ColourReset "${Esc}[m")
6 set(ColourBold "${Esc}[1m")
7 set(Red "${Esc}[31m")
8 set(Green "${Esc}[32m")
9 set(Yellow "${Esc}[33m")
10 set(Blue "${Esc}[34m")
11 set(Magenta "${Esc}[35m")
12 set(Cyan "${Esc}[36m")
13 set(White "${Esc}[37m")
14 set(BoldRed "${Esc}[1;31m")
15 set(BoldGreen "${Esc}[1;32m")
16 set(BoldYellow "${Esc}[1;33m")
17 set(BoldBlue "${Esc}[1;34m")
18 set(BoldMagenta "${Esc}[1;35m")
19 set(BoldCyan "${Esc}[1;36m")
20 set(BoldWhite "${Esc}[1;37m")
21 endif()
22
23 #message("This is normal")
24 #message("${Red}This is Red${ColourReset}")
25 #message("${Green}This is Green${ColourReset}")
26 #message("${Yellow}This is Yellow${ColourReset}")
27 #message("${Blue}This is Blue${ColourReset}")
28 #message("${Magenta}This is Magenta${ColourReset}")
29 #message("${Cyan}This is Cyan${ColourReset}")
30 #message("${White}This is White${ColourReset}")
31 #message("${BoldRed}This is BoldRed${ColourReset}")
32 #message("${BoldGreen}This is BoldGreen${ColourReset}")
33 #message("${BoldYellow}This is BoldYellow${ColourReset}")
34 #message("${BoldBlue}This is BoldBlue${ColourReset}")
35 #message("${BoldMagenta}This is BoldMagenta${ColourReset}")
36 #message("${BoldCyan}This is BoldCyan${ColourReset}")
37 #message("${BoldWhite}This is BoldWhite\n\n${ColourReset}")
38