diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2017-11-12 11:48:07 +0100 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2018-04-11 09:14:00 +0200 |
commit | 5220ec2453f9f1b9c573b752855ecdcd3d1df784 (patch) | |
tree | 594f303bbb5eb0a4d023434c67c945e900fd61f8 | |
parent | 8c8c15f26dd61be5c9bdfc67b5d4b04b65d126f9 (diff) | |
download | dconf-5220ec2453f9f1b9c573b752855ecdcd3d1df784.tar.gz |
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.
https://bugzilla.gnome.org/show_bug.cgi?id=790236
-rw-r--r-- | common/meson.build | 6 | ||||
-rw-r--r-- | 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 276e227..59b3176 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') |