summaryrefslogtreecommitdiffstats
path: root/Help/variable/CMAKE_COLOR_DIAGNOSTICS.rst
blob: 805467a866478188c23f1615739372129410d2da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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``).

``CMAKE_COLOR_DIAGNOSTICS`` is not defined by default.