From 0bb1673ec36b4fe498aa4636ac52ea24fd36b2e9 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 27 Feb 2023 10:25:48 -0500 Subject: [PATCH] doc: Be more specific about warning_level option Fixes: #11469 --- docs/markdown/Builtin-options.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index f8c3d8af7..f8e94a83c 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -95,6 +95,8 @@ machine](#specifying-options-per-machine) section for details. | wrap_mode {default, nofallback,
nodownload, forcefallback, nopromote} | default | Wrap mode to use | no | no | | force_fallback_for | [] | Force fallback for those dependencies | no | no | +#### Details for `buildtype` + For setting optimization levels and toggling debug, you can either set the `buildtype` option, or you can set the `optimization` and `debug` options which give finer control @@ -113,6 +115,21 @@ the two-way mapping: All other combinations of `debug` and `optimization` set `buildtype` to `'custom'`. +#### Details for `warning_level` + +Exact flags per warning level is compiler specific, but there is an approximative +table for most common compilers. + +| Warning level | GCC/Clang | MSVC | +| ------------- | --- | ---- | +| 0 | | | +| 1 | -Wall | /W2 | +| 2 | -Wall -Wextra | /W3 | +| 3 | -Wall -Wextra -Wpedantic | /W4 | +| everything | -Weverything | /Wall | + +Clang's `-Weverything` is emulated on GCC by passing all known warning flags. + ## Base options These are set in the same way as universal options, either by