19323cb39bae6a83d8b368c71bb540d5fcc3e653
[platform/upstream/cmake.git] / Help / prop_tgt / COMPILE_WARNING_AS_ERROR.rst
1 COMPILE_WARNING_AS_ERROR
2 ------------------------
3
4 .. versionadded:: 3.24
5
6 Specify whether to treat warnings on compile as errors.
7 If enabled, adds a flag to treat warnings on compile as errors.
8 If the ``--compile-no-warning-as-error`` option is given on the
9 :manual:`cmake(1)` command line, this property is ignored.
10
11 This property is not implemented for all compilers.  It is silently ignored
12 if there is no implementation for the compiler being used.  The currently
13 implemented :variable:`compiler IDs <CMAKE_<LANG>_COMPILER_ID>` are:
14
15 * ``GNU``
16 * ``Clang``
17 * ``AppleClang``
18 * ``Fujitsu``
19 * ``FujitsuClang``
20 * ``IBMClang``
21 * ``Intel``
22 * ``IntelLLVM``
23 * ``LCC``
24 * ``MSVC``
25 * ``NVHPC``
26 * ``NVIDIA`` (CUDA)
27 * ``QCC``
28 * ``SunPro``
29 * ``TI``
30 * ``VisualAge``
31 * ``XL``
32 * ``XLClang``
33
34 This property is initialized by the value of the variable
35 :variable:`CMAKE_COMPILE_WARNING_AS_ERROR` if it is set when a target is created.