[gegl] meson: actually apply compiler arguments
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] meson: actually apply compiler arguments
- Date: Fri, 25 Oct 2019 14:26:55 +0000 (UTC)
commit 26cdd492835b247f353a626ff904d4b136851f4c
Author: Ell <ell_se yahoo com>
Date: Fri Oct 25 17:14:13 2019 +0300
meson: actually apply compiler arguments
... they were unused before.
meson.build | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index bb8f4461c..3137a48a2 100644
--- a/meson.build
+++ b/meson.build
@@ -23,8 +23,10 @@ i18n = import('i18n')
gnome = import('gnome')
python = import('python').find_installation()
-cc = meson.get_compiler('c')
-config= configuration_data()
+cc = meson.get_compiler('c')
+cpp = meson.get_compiler('cpp')
+buildtype = get_option('buildtype')
+config = configuration_data()
################################################################################
# Project infos
@@ -89,22 +91,34 @@ else
error('Unknown host architecture')
endif
-# Should be filled with c_arguments, is checked before use.
-c_arguments = [
+################################################################################
+# Compiler arguments
+
+cflags_common = []
+cflags_c = []
+cflags_cpp = []
+
+cflags_common += [
'-DHAVE_CONFIG_H',
]
-################################################################################
-# Extra warnings
-c_arguments += [
+cflags_common += [
'-Winit-self',
'-Wmissing-declarations',
- '-Wmissing-prototypes',
- '-Wold-style-definition',
'-Wpointer-arith',
'-Wno-deprecated-declarations',
]
+cflags_c = [
+ '-Wmissing-prototypes',
+ '-Wold-style-definition',
+]
+
+cflags_c = cflags_common + cflags_c
+cflags_cpp = cflags_common + cflags_cpp
+
+add_project_arguments(cc.get_supported_arguments(cflags_c), language: 'c')
+add_project_arguments(cpp.get_supported_arguments(cflags_cpp), language: 'cpp')
################################################################################
# Utilities
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]