color: Introduce CMAKE_COLOR_DIAGNOSTICS variable
This MR introduces CMAKE_COLOR_DIAGNOSTICS
variable that controls:
- whether CMake should enable colored compiler diagnostics via compiler flags,
- and
CMAKE_COLOR_MAKEFILE
variable.
Additionally, this MR adds support for CMAKE_COLOR_DIAGNOSTICS
environment variable, which controls default value for CMAKE_COLOR_DIAGNOSTICS
variable.
See MR 6747 for previous iteration and this comment for implementation idea.
Fixes: #15502 (closed)
Topic-rename: color-diagnostics
Edited by Brad King