diff options
author | Tomas Krizek <tomas.krizek@nic.cz> | 2019-02-12 13:08:03 +0100 |
---|---|---|
committer | Tomas Krizek <tomas.krizek@nic.cz> | 2019-03-12 10:43:27 +0100 |
commit | 76ad88d0cf23d284f18863a6881378ba573ffa98 (patch) | |
tree | 1d4ebdb206582f26b9c88917ee6c843c8b79bca5 | |
parent | meson: remove moduledir (diff) | |
download | knot-resolver-76ad88d0cf23d284f18863a6881378ba573ffa98.tar.xz knot-resolver-76ad88d0cf23d284f18863a6881378ba573ffa98.zip |
meson: use c_args instead of setting global compiler options
-rw-r--r-- | client/meson.build | 1 | ||||
-rw-r--r-- | contrib/meson.build | 1 | ||||
-rw-r--r-- | daemon/meson.build | 1 | ||||
-rw-r--r-- | lib/meson.build | 1 | ||||
-rw-r--r-- | meson.build | 6 | ||||
-rw-r--r-- | modules/bogus_log/meson.build | 1 | ||||
-rw-r--r-- | modules/dnstap/meson.build | 1 | ||||
-rw-r--r-- | modules/edns_keepalive/meson.build | 1 | ||||
-rw-r--r-- | modules/hints/meson.build | 1 | ||||
-rw-r--r-- | modules/nsid/meson.build | 1 | ||||
-rw-r--r-- | modules/stats/meson.build | 1 | ||||
-rw-r--r-- | tests/pytests/meson.build | 2 | ||||
-rw-r--r-- | tests/unit/meson.build | 1 |
13 files changed, 14 insertions, 5 deletions
diff --git a/client/meson.build b/client/meson.build index cbbabf67..7d864615 100644 --- a/client/meson.build +++ b/client/meson.build @@ -31,6 +31,7 @@ if build_client libkres_dep, libedit, ], + c_args: c_args, install: true, install_dir: get_option('sbindir'), ) diff --git a/contrib/meson.build b/contrib/meson.build index 0c7aeb1c..e980d111 100644 --- a/contrib/meson.build +++ b/contrib/meson.build @@ -18,6 +18,7 @@ contrib_lib = static_library( contrib_src, include_directories: contrib_inc, dependencies: libknot, + c_args: c_args, ) contrib_dep = declare_dependency( diff --git a/daemon/meson.build b/daemon/meson.build index ffdb4c77..1fe62073 100644 --- a/daemon/meson.build +++ b/daemon/meson.build @@ -50,6 +50,7 @@ kresd = executable( kresd_src, dependencies: kresd_deps, export_dynamic: true, + c_args: c_args, install: true, install_dir: get_option('sbindir'), ) diff --git a/lib/meson.build b/lib/meson.build index 20d97bed..f2603630 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -87,6 +87,7 @@ libkres_lib = library('kres', gnutls, luajit, ], + c_args: c_args, install: true, ) diff --git a/meson.build b/meson.build index 6b91b986..ef0eb667 100644 --- a/meson.build +++ b/meson.build @@ -89,8 +89,7 @@ if opt_systemd != 'disabled' message('---------------------------') endif -# TODO use var instead -add_global_arguments( +c_args = [ '-D_GNU_SOURCE', '-Wtype-limits', '-Wformat', @@ -98,8 +97,7 @@ add_global_arguments( '-Wshadow', '-Wall', '-fvisibility=hidden', - language: 'c', -) +] # Lists of tests # These lists are added to from subdir() and finally used in tests/* diff --git a/modules/bogus_log/meson.build b/modules/bogus_log/meson.build index 08419b1e..d2336cec 100644 --- a/modules/bogus_log/meson.build +++ b/modules/bogus_log/meson.build @@ -13,6 +13,7 @@ bogus_log_mod = shared_module( libknot, ], name_prefix: '', + c_args: c_args, install: true, install_dir: modules_dir, ) diff --git a/modules/dnstap/meson.build b/modules/dnstap/meson.build index 2db216c3..84ef3507 100644 --- a/modules/dnstap/meson.build +++ b/modules/dnstap/meson.build @@ -41,6 +41,7 @@ if libprotobuf_c.found() and libfstrm.found() and protoc_c.found() libprotobuf_c, ], name_prefix: '', + c_args: c_args, install: true, install_dir: modules_dir, ) diff --git a/modules/edns_keepalive/meson.build b/modules/edns_keepalive/meson.build index f94c0cc5..1f649481 100644 --- a/modules/edns_keepalive/meson.build +++ b/modules/edns_keepalive/meson.build @@ -13,6 +13,7 @@ edns_keepalive_mod = shared_module( libknot, ], name_prefix: '', + c_args: c_args, install: true, install_dir: modules_dir, ) diff --git a/modules/hints/meson.build b/modules/hints/meson.build index 41fa0c3d..83e65367 100644 --- a/modules/hints/meson.build +++ b/modules/hints/meson.build @@ -14,6 +14,7 @@ hints_mod = shared_module( luajit, ], name_prefix: '', + c_args: c_args, install: true, install_dir: modules_dir, ) diff --git a/modules/nsid/meson.build b/modules/nsid/meson.build index 1b796bb0..c719721a 100644 --- a/modules/nsid/meson.build +++ b/modules/nsid/meson.build @@ -14,6 +14,7 @@ nsid_mod = shared_module( luajit, ], name_prefix: '', + c_args: c_args, install: true, install_dir: modules_dir, ) diff --git a/modules/stats/meson.build b/modules/stats/meson.build index 769b867a..b790e2e3 100644 --- a/modules/stats/meson.build +++ b/modules/stats/meson.build @@ -14,6 +14,7 @@ stats_mod = shared_module( luajit, ], name_prefix: '', + c_args: c_args, install: true, install_dir: modules_dir, ) diff --git a/tests/pytests/meson.build b/tests/pytests/meson.build index 2e228609..80b5a1b2 100644 --- a/tests/pytests/meson.build +++ b/tests/pytests/meson.build @@ -6,7 +6,6 @@ tlsproxy_src = [ ] # compile tlsproxy -# TODO fix or silence compilation warnings tlsproxy = executable( 'tlsproxy', tlsproxy_src, @@ -15,6 +14,7 @@ tlsproxy = executable( libuv, gnutls, ], + c_args: c_args, ) # python 3 dependencies diff --git a/tests/unit/meson.build b/tests/unit/meson.build index 43ca7675..d05e6b0e 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -27,6 +27,7 @@ foreach unit_test : unit_tests cmocka, lmdb, ], + c_args: c_args, ) test( 'unit.' + unit_test[0], |