cmake_test/colors

This module provides an option called CMAKETEST_USE_COLORS and a set of global variables to use to color terminal output. These global constants are just one-to-one constants of specific ANSI control codes. If CMAKETEST_USE_COLORS is not set to true or if the OS is Windows (cmd doesn’t support ANSI control codes), these constants will not be defined and should resolve to an empty string.

Example:

cmake_test/colors.CMAKETEST_USE_COLORS

Note

This variable is a user-editable option, meaning it appears within the cache and can be edited on the command line by the -D flag.

Enable colors in Unix environments, ignored on Windows. Will output garbage for pipes and text files. If false, all constants in this file are not defined, so will resolve to the empty string.

Help text:

“This option enables coloration in CMakeTest output. If enabled will mangle log files or pipes that do not support coloration. This option is ignored on Windows.”

Default value:

“FALSE”

Type:

bool

cmake_test/colors.string(ASCII 27 Esc)

Warning

This is a generic command invocation. It is not a function or macro definition.

The character used to start the ANSI control code.

cmake_test/colors.CT_ColorReset

Resets the color to the terminal default.

Default value:

${Esc}[m

Type:

str

cmake_test/colors.CT_ColorBold

Sets the text that follows to be bold.

Default value:

${Esc}[1m

Type:

str

cmake_test/colors.CT_Red

Sets the text color to red.

Default value:

${Esc}[31m

Type:

str

cmake_test/colors.CT_Green

Sets the text color to green.

Default value:

${Esc}[32m

Type:

str

cmake_test/colors.CT_Yellow

Sets the text color to yellow.

Default value:

${Esc}[33m

Type:

str

cmake_test/colors.CT_Blue

Sets the text color to blue.

Default value:

${Esc}[34m

Type:

str

cmake_test/colors.CT_Magenta

Sets the text color to magenta.

Default value:

${Esc}[35m

Type:

str

cmake_test/colors.CT_Cyan

Sets the text color to cyan.

Default value:

${Esc}[36m

Type:

str

cmake_test/colors.CT_White

Sets the text color to white.

Default value:

${Esc}[37m

Type:

str

cmake_test/colors.CT_BoldRed

Sets the text color to bold red.

Default value:

${Esc}[1;31m

Type:

str

cmake_test/colors.CT_BoldGreen

Sets the text color to bold green.

Default value:

${Esc}[1;32m

Type:

str

cmake_test/colors.CT_BoldYellow

Sets the text color to bold yellow.

Default value:

${Esc}[1;33m

Type:

str

cmake_test/colors.CT_BoldBlue

Sets the text color to bold blue.

Default value:

${Esc}[1;34m

Type:

str

cmake_test/colors.CT_BoldMagenta

Sets the text color to bold magenta.

Default value:

${Esc}[1;35m

Type:

str

cmake_test/colors.CT_BoldCyan

Sets the text color to bold cyan.

Default value:

${Esc}[1;36m

Type:

str

cmake_test/colors.CT_BoldWhite

Sets the text color to bold white.

Default value:

${Esc}[1;37m

Type:

str