summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/COMPILE_WARNING_AS_ERROR.rst
blob: 684b9ddb4679a62ad68bb27eb8530b2a0b489061 (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
COMPILE_WARNING_AS_ERROR
------------------------

.. versionadded:: 3.24

Specify whether to treat warnings on compile as errors.
If enabled, adds a flag to treat warnings on compile as errors.
If the :option:`cmake --compile-no-warning-as-error` option is given
on the :manual:`cmake(1)` command line, this property is ignored.

This property is not implemented for all compilers.  It is silently ignored
if there is no implementation for the compiler being used.  The currently
implemented :variable:`compiler IDs <CMAKE_<LANG>_COMPILER_ID>` are:

* ``GNU``
* ``Clang``
* ``AppleClang``
* ``Fujitsu``
* ``FujitsuClang``
* ``IBMClang``
* ``Intel``
* ``IntelLLVM``
* ``LCC``
* ``MSVC``
* ``NVHPC``
* ``NVIDIA`` (CUDA)
* ``QCC``
* ``SunPro``
* ``TI``
* ``VisualAge``
* ``XL``
* ``XLClang``

This property is initialized by the value of the variable
:variable:`CMAKE_COMPILE_WARNING_AS_ERROR` if it is set when a target is created.