[dconf: 4/21] build: Use get_supported_arguments helper
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf: 4/21] build: Use get_supported_arguments helper
- Date: Sat, 11 Aug 2018 21:38:01 +0000 (UTC)
commit 082a10cbadd6d7951d12c9b92aa5e1e7278f0068
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Sun Nov 12 11:48:07 2017 +0100
build: Use get_supported_arguments helper
meson 0.43.0 comes with a new function in the compiler's object
called `get_supported_arguments`, which allows checking multiple
optiones at once.
This patch bumps meson's version number and also takes advantage
of this new feature.
common/meson.build | 6 +-----
meson.build | 8 ++------
2 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/common/meson.build b/common/meson.build
index c431fe9..28427f6 100644
--- a/common/meson.build
+++ b/common/meson.build
@@ -38,11 +38,7 @@ libdconf_common_shared = static_library(
pic: true
)
-test_cflag = '-fvisibility=hidden'
-
-if cc.has_argument(test_cflag)
- cflags += [test_cflag]
-endif
+cflags += cc.get_supported_arguments('-fvisibility=hidden')
libdconf_common_hidden = static_library(
name + '-hidden',
diff --git a/meson.build b/meson.build
index 739da14..9ed24ba 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project(
'dconf', ['c', 'vala'],
version: '0.28.0',
license: 'LGPL2.1+',
- meson_version: '>= 0.41.0'
+ meson_version: '>= 0.43.0'
)
dconf_version = meson.project_version()
@@ -58,11 +58,7 @@ if get_option('buildtype').contains('debug')
'-Wwrite-strings'
]
- foreach cflag: test_cflags
- if cc.has_argument(cflag)
- common_flags += [cflag]
- endif
- endforeach
+ common_flags += cc.get_supported_arguments(test_cflags)
endif
add_project_arguments(common_flags, language: 'c')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]