forked from enlightenment/efl
build: add warnings and compiler flags to meson
this moves meson and autotools closer to each other. The flags are selected in order to keep the amount of warnings low. Differential Revision: https://phab.enlightenment.org/D7429
This commit is contained in:
parent
0d2b624f1e
commit
28f155a5c6
16
meson.build
16
meson.build
|
@ -77,6 +77,22 @@ local_benchmark = join_paths('src', 'benchmarks')
|
||||||
local_examples = join_paths('src', 'examples')
|
local_examples = join_paths('src', 'examples')
|
||||||
local_scripts = join_paths('src', 'scripts')
|
local_scripts = join_paths('src', 'scripts')
|
||||||
|
|
||||||
|
dev_cflags = []
|
||||||
|
dev_cflags_try = [
|
||||||
|
'-fvisibility=hidden',
|
||||||
|
'-Wall',
|
||||||
|
'-Wsign-compare',
|
||||||
|
'-Wno-missing-field-initializers',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach cf: dev_cflags_try
|
||||||
|
if cc.has_argument(cf) == true
|
||||||
|
dev_cflags += cf
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
add_global_arguments(dev_cflags, language: 'c')
|
||||||
|
|
||||||
|
|
||||||
foreach lang : ['c', 'objc', 'cpp']
|
foreach lang : ['c', 'objc', 'cpp']
|
||||||
add_global_arguments('-DHAVE_CONFIG_H=1', language: lang)
|
add_global_arguments('-DHAVE_CONFIG_H=1', language: lang)
|
||||||
add_global_arguments('-D_GNU_SOURCE=1', language: lang)
|
add_global_arguments('-D_GNU_SOURCE=1', language: lang)
|
||||||
|
|
Loading…
Reference in New Issue