[gsound/wtay/gsound-master: 2/2] build: Add a number of C compilation flags
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gsound/wtay/gsound-master: 2/2] build: Add a number of C compilation flags
- Date: Tue, 27 Jul 2021 10:25:29 +0000 (UTC)
commit 89bec785f1eccc46592e6fb562e4c273994e5b2d
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jul 27 12:20:35 2021 +0200
build: Add a number of C compilation flags
meson.build | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/meson.build b/meson.build
index 10d412b..35197aa 100644
--- a/meson.build
+++ b/meson.build
@@ -3,6 +3,28 @@ project(
'c',
version : '1.0.2',
)
+
+test_cflags = [
+ '-fno-strict-aliasing',
+ '-Wcast-align',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wpointer-arith',
+ '-Werror=format=2',
+ '-Werror=implicit-function-declaration',
+ '-Werror=init-self',
+ '-Werror=missing-include-dirs',
+ '-Werror=missing-prototypes',
+ '-Werror=pointer-arith',
+ '-Werror=return-type',
+ '-Wstrict-prototypes',
+]
+
+cc = meson.get_compiler('c')
+warn_flags = cc.get_supported_arguments(test_cflags)
+add_project_arguments(warn_flags, language: 'c')
+
if get_option('enable_vala')
add_languages('vala')
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]