Browse Source

Help: Document CLICOLOR and CLICOLOR_FORCE environment variables

Issue: #26451
Brad King 11 months ago
parent
commit
1224fbce3f

+ 14 - 0
Help/envvar/CLICOLOR.rst

@@ -0,0 +1,14 @@
+CLICOLOR
+--------
+
+.. versionadded:: 3.21
+
+.. include:: ENV_VAR.txt
+
+Set to ``0`` to tell CMake command-line tools not to print color
+messages even if connected to a terminal.
+
+See also the :envvar:`CLICOLOR_FORCE` environment variable.
+
+See the :variable:`CMAKE_COLOR_DIAGNOSTICS` variable to control
+color in a generated build system.

+ 14 - 0
Help/envvar/CLICOLOR_FORCE.rst

@@ -0,0 +1,14 @@
+CLICOLOR_FORCE
+--------------
+
+.. versionadded:: 3.5
+
+.. include:: ENV_VAR.txt
+
+Set to a non-empty value, other than ``0``, to tell CMake command-line
+tools to print color messages even if not connected to a terminal.
+
+See also the :envvar:`CLICOLOR` environment variable.
+
+See the :variable:`CMAKE_COLOR_DIAGNOSTICS` variable to control
+color in a generated build system.

+ 2 - 0
Help/manual/cmake-env-variables.7.rst

@@ -20,6 +20,8 @@ Environment Variables that Change Behavior
 .. toctree::
    :maxdepth: 1
 
+   /envvar/CLICOLOR
+   /envvar/CLICOLOR_FORCE
    /envvar/CMAKE_APPBUNDLE_PATH
    /envvar/CMAKE_FRAMEWORK_PATH
    /envvar/CMAKE_INCLUDE_PATH

+ 4 - 1
Help/variable/CMAKE_COLOR_DIAGNOSTICS.rst

@@ -3,7 +3,7 @@ CMAKE_COLOR_DIAGNOSTICS
 
 .. versionadded:: 3.24
 
-Enable color diagnostics throughout.
+Enable color diagnostics throughout the generated build system.
 
 This variable uses three states: ``ON``, ``OFF`` and not defined.
 
@@ -35,3 +35,6 @@ When ``OFF``:
 If the :envvar:`CMAKE_COLOR_DIAGNOSTICS` environment variable is set, its
 value is used.  Otherwise, ``CMAKE_COLOR_DIAGNOSTICS`` is not defined by
 default.
+
+See the :envvar:`CLICOLOR` and :envvar:`CLICOLOR_FORCE` environment
+variables to control color output from CMake command-line tools.