summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2018-07-19 15:22:06 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-07-26 10:09:20 +0200
commit3e3eeb4d5ff754c3425fc38a4cbd2f6be872f1d9 (patch)
tree77b44aa05869f4c9b4bc929e102701e48f6f169b /examples
parent203b61dc5e182ffe07e07e457d4f079dc06d1cb7 (diff)
downloaddpdk-3e3eeb4d5ff754c3425fc38a4cbd2f6be872f1d9.zip
dpdk-3e3eeb4d5ff754c3425fc38a4cbd2f6be872f1d9.tar.gz
dpdk-3e3eeb4d5ff754c3425fc38a4cbd2f6be872f1d9.tar.xz
build: remove duplicate checks for cflags
There is no need to check for each library, driver and example whether certain cflags are supported. Instead of checking inside the loop, do so outside and reuse the value. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/meson.build9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/meson.build b/examples/meson.build
index e655887..4ee7a11 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -18,15 +18,16 @@ else
examples = get_option('examples').split(',')
allow_skips = false # error out if we can't build a requested app
endif
+default_cflags = machine_args
+if cc.has_argument('-Wno-format-truncation')
+ default_cflags += '-Wno-format-truncation'
+endif
foreach example: examples
name = example
build = true
sources = []
allow_experimental_apis = false
- cflags = machine_args
- if cc.has_argument('-Wno-format-truncation')
- cflags += '-Wno-format-truncation'
- endif
+ cflags = default_cflags
ext_deps = [execinfo]
includes = [include_directories(example)]