Link step: Add LINK_WARNING_AS_ERROR target property

Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property

Fixes: #25343
This commit is contained in:
Marc Chevrier
2024-11-06 11:53:59 +01:00
parent 656267c871
commit 7907c83175
58 changed files with 421 additions and 28 deletions
@@ -0,0 +1,9 @@
CMAKE_LINK_WARNING_AS_ERROR
---------------------------
.. versionadded:: 3.32
Specify whether to treat warnings on link as errors.
This variable is used to initialize the
:prop_tgt:`LINK_WARNING_AS_ERROR` property on all the targets.