From 4e2916ad6ec59f2e6a1eff3ac724b714e1f14897 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Fri, 18 Jul 2025 23:18:58 +0300
Subject: [PATCH 49/49] meson: use `warning_level` default option instead of
 `-Wall`

We can set the warning level to the equivalent of `-Wall` by default
using project options, while enabling users or downstreams to set
a desired warning level if they so choose.

This will also reduce noise during the configure stage as Meson
warns about `-Wall` for each compiler.

Main branch patch by Matt Jolly
Backported by myself

See RM #1316

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index f35b37312f..365d76fc79 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,8 @@
 
 project('freeciv', ['c'],
         meson_version: '>= 0.60.0',
-        version : run_command('fc_version', check : true).stdout())
+        version : run_command('fc_version', check : true).stdout(),
+        default_options: ['warning_level=1'])
 
 c_compiler = meson.get_compiler('c')
 
@@ -23,7 +24,6 @@ c_args = [
   ]
 
 c_cpp_args = [
-  '-Wall',
   '-Wmissing-declarations',
   '-Wpointer-arith',
   '-Wcast-align',
-- 
2.47.2

