summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-09 17:15:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-09 17:15:53 (GMT)
commit51e81d1f7354fc425b3fc210900cab37ca00926f (patch)
treefbd06710a3ba6dc94af59103e834846cf8670229 /Help/variable
parent4802b27e64db507a36c73cdabd7fd2ef01fda228 (diff)
parent6ab9fbd43bfce25cf9ee71a81145a1e5f9dc4a12 (diff)
downloadCMake-51e81d1f7354fc425b3fc210900cab37ca00926f.zip
CMake-51e81d1f7354fc425b3fc210900cab37ca00926f.tar.gz
CMake-51e81d1f7354fc425b3fc210900cab37ca00926f.tar.bz2
Merge topic 'color-diagnostics'
6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS 78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Frank Dana <ferdnyc@gmail.com> Merge-request: !6990
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_COLOR_DIAGNOSTICS.rst37
1 files changed, 37 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_COLOR_DIAGNOSTICS.rst b/Help/variable/CMAKE_COLOR_DIAGNOSTICS.rst
new file mode 100644
index 0000000..a72c9e1
--- /dev/null
+++ b/Help/variable/CMAKE_COLOR_DIAGNOSTICS.rst
@@ -0,0 +1,37 @@
+CMAKE_COLOR_DIAGNOSTICS
+-----------------------
+
+.. versionadded:: 3.24
+
+Enable color diagnostics throughout.
+
+This variable uses three states: ``ON``, ``OFF`` and not defined.
+
+When not defined:
+
+* :ref:`Makefile Generators` initialize the :variable:`CMAKE_COLOR_MAKEFILE`
+ variable to ``ON``. It controls color buildsystem messages.
+
+* GNU/Clang compilers are not invoked with any color diagnostics flag.
+
+When ``ON``:
+
+* :ref:`Makefile Generators` produce color buildsystem messages by default.
+ :variable:`CMAKE_COLOR_MAKEFILE` is not initialized, but may be
+ explicitly set to ``OFF`` to disable color buildsystem messages.
+
+* GNU/Clang compilers are invoked with a flag enabling color diagnostics
+ (``-fcolor-diagnostics``).
+
+When ``OFF``:
+
+* :ref:`Makefile Generators` do not produce color buildsystem messages by
+ default. :variable:`CMAKE_COLOR_MAKEFILE` is not initialized, but may be
+ explicitly set to ``ON`` to enable color buildsystem messages.
+
+* GNU/Clang compilers are invoked with a flag disabling color diagnostics
+ (``-fno-color-diagnostics``).
+
+If the :envvar:`CMAKE_COLOR_DIAGNOSTICS` environment variable is set, its
+value is used. Otherwise, ``CMAKE_COLOR_DIAGNOSTICS`` is not defined by
+default.