cmake/Help/prop_tgt/COMPILE_WARNING_AS_ERROR.rst

38 lines
945 B
ReStructuredText
Raw Normal View History

2022-08-04 22:12:04 +02:00
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.
2022-11-16 20:14:03 +01:00
If the :option:`cmake --compile-no-warning-as-error` option is given
on the :manual:`cmake(1)` command line, this property is ignored.
2022-08-18 17:26:31 +02:00
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``
2022-11-16 20:14:03 +01:00
* ``Tasking``
2022-08-18 17:26:31 +02:00
* ``TI``
* ``VisualAge``
* ``XL``
* ``XLClang``
2022-08-04 22:12:04 +02:00
This property is initialized by the value of the variable
2022-11-16 20:14:03 +01:00
:variable:`CMAKE_COMPILE_WARNING_AS_ERROR` if it is set when a target is
created.