[wing/improve-meson: 1/4] meson: improve how we get the supported cflags
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing/improve-meson: 1/4] meson: improve how we get the supported cflags
- Date: Thu, 26 Mar 2020 13:56:18 +0000 (UTC)
commit 16e1da83f7ce735ae7c4783635ce868084bf4997
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Thu Mar 26 13:53:37 2020 +0100
meson: improve how we get the supported cflags
meson.build | 8 ++------
wing/meson.build | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6dfa93c..3135d43 100644
--- a/meson.build
+++ b/meson.build
@@ -101,12 +101,8 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
else
test_cflags = []
endif
-common_flags = []
-foreach cflag: test_cflags
- if cc.has_argument(cflag)
- common_flags += [ cflag ]
- endif
-endforeach
+
+common_cflags = cc.get_supported_arguments(test_cflags)
extra_args= []
# Detect and set symbol visibility
diff --git a/wing/meson.build b/wing/meson.build
index a154003..749f191 100644
--- a/wing/meson.build
+++ b/wing/meson.build
@@ -62,7 +62,7 @@ wing = shared_library('wing-@0@'.format(wing_api_version),
soversion: soversion,
install: true,
dependencies: platform_deps,
- c_args: extra_args + common_flags + [ '-DG_LOG_DOMAIN="Wing"' ],
+ c_args: extra_args + common_cflags + [ '-DG_LOG_DOMAIN="Wing"' ],
link_args: wing_link_args)
# Generate pc file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]