From e2198fd9dcc281d67e9cfbdf9501d46daeb814d3 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sat, 13 Aug 2022 03:15:45 +0400 Subject: Help: Format `-Werror`/`-Wno-error` in the way it can be referenced Replace mentions of these options in the presets manual page. --- Help/manual/OPTIONS_BUILD.txt | 44 ++++++++++++++++++++--------------------- Help/manual/cmake-presets.7.rst | 14 +++++++------ 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 3868276..4220dc0 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -109,20 +109,6 @@ Enable warnings that are meant for the author of the ``CMakeLists.txt`` files. By default this will also turn on deprecation warnings. -.. option:: -Werror=dev - - Make developer warnings errors. - - Make warnings that are meant for the author of the ``CMakeLists.txt`` files - errors. By default this will also turn on deprecated warnings as errors. - -.. option:: -Wno-error=dev - - Make developer warnings not errors. - - Make warnings that are meant for the author of the ``CMakeLists.txt`` files not - errors. By default this will also turn off deprecated warnings as errors. - .. option:: -Wdeprecated Enable deprecated functionality warnings. @@ -137,16 +123,30 @@ Suppress warnings for usage of deprecated functionality, that are meant for the author of the ``CMakeLists.txt`` files. -.. option:: -Werror=deprecated +.. option:: -Werror= + + Treat CMake warnings as errors. ```` must be one of the following: + + ``dev`` + Make developer warnings errors. + + Make warnings that are meant for the author of the ``CMakeLists.txt`` files + errors. By default this will also turn on deprecated warnings as errors. + + ``deprecated`` + Make deprecated macro and function warnings errors. - Make deprecated macro and function warnings errors. + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the ``CMakeLists.txt`` files, errors. - Make warnings for usage of deprecated macros and functions, that are meant - for the author of the ``CMakeLists.txt`` files, errors. +.. option:: -Wno-error= -.. option:: -Wno-error=deprecated + Do not treat CMake warnings as errors. ```` must be one of the following: - Make deprecated macro and function warnings not errors. + ``dev`` + Make warnings that are meant for the author of the ``CMakeLists.txt`` files not + errors. By default this will also turn off deprecated warnings as errors. - Make warnings for usage of deprecated macros and functions, that are meant - for the author of the ``CMakeLists.txt`` files, not errors. + ``deprecated`` + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the ``CMakeLists.txt`` files, not errors. diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index ea43b14..c5044b5 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -349,15 +349,17 @@ that may contain the following fields: ``dev`` - An optional boolean. Equivalent to passing ``-Werror=dev`` or - ``-Wno-error=dev`` on the command line. This may not be set to ``true`` - if ``warnings.dev`` is set to ``false``. + An optional boolean. Equivalent to passing :option:`-Werror=dev ` + or :option:`-Wno-error=dev ` on the command line. + This may not be set to ``true`` if ``warnings.dev`` is set to ``false``. ``deprecated`` - An optional boolean. Equivalent to passing ``-Werror=deprecated`` or - ``-Wno-error=deprecated`` on the command line. This may not be set to - ``true`` if ``warnings.deprecated`` is set to ``false``. + An optional boolean. Equivalent to passing + :option:`-Werror=deprecated ` or + :option:`-Wno-error=deprecated ` on the command line. + This may not be set to ``true`` if ``warnings.deprecated`` is set to + ``false``. ``debug`` -- cgit v0.12