aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-07 16:30:48 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-17 09:11:18 +0100
commit28f155a5c6f7ef05923f3607f442ce3ebdac4740 (patch)
tree0fd96361087b04b4a33ec04ab494ce18eeace9cd /meson.build
parentevas gl - make GLintptr etc. also ndefed for GL_VERSION_1_5 fix typedef (diff)
downloadefl-28f155a5c6f7ef05923f3607f442ce3ebdac4740.tar.gz
build: add warnings and compiler flags to meson
this moves meson and autotools closer to each other. The flags are selected in order to keep the amount of warnings low. Differential Revision: https://phab.enlightenment.org/D7429
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 16 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index d3dfd54424..f85681c7cc 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,22 @@ local_benchmark = join_paths('src', 'benchmarks')
local_examples = join_paths('src', 'examples')
local_scripts = join_paths('src', 'scripts')
+dev_cflags = []
+dev_cflags_try = [
+ '-fvisibility=hidden',
+ '-Wall',
+ '-Wsign-compare',
+ '-Wno-missing-field-initializers',
+]
+
+foreach cf: dev_cflags_try
+ if cc.has_argument(cf) == true
+ dev_cflags += cf
+ endif
+endforeach
+add_global_arguments(dev_cflags, language: 'c')
+
+
foreach lang : ['c', 'objc', 'cpp']
add_global_arguments('-DHAVE_CONFIG_H=1', language: lang)
add_global_arguments('-D_GNU_SOURCE=1', language: lang)