mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
meson: Fix CFLAGS use by using add_project_arguments
It seems that meson will not always apply the CFLAGS as defined through the environment if "c_args=" is used in the default_options array for the project() call. Switching to add_project_arguments solves this problem. See https://github.com/mesonbuild/meson/issues/8037
This commit is contained in:
committed by
Benjamin Berg
parent
df568e1ce1
commit
ec7376d7e6
80
meson.build
80
meson.build
@ -5,45 +5,6 @@ project('fprintd', 'c',
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1',
|
||||
'c_std=gnu99',
|
||||
'c_args=' + ' '.join([
|
||||
'-fno-strict-aliasing',
|
||||
'-Wall',
|
||||
'-Wcast-align',
|
||||
'-Werror=address',
|
||||
'-Werror=array-bounds',
|
||||
'-Werror=empty-body',
|
||||
'-Werror=implicit',
|
||||
'-Werror=init-self',
|
||||
'-Werror=int-to-pointer-cast',
|
||||
'-Werror=main',
|
||||
'-Werror=missing-braces',
|
||||
'-Werror=nonnull',
|
||||
'-Werror=pointer-to-int-cast',
|
||||
'-Werror=redundant-decls',
|
||||
'-Werror=return-type',
|
||||
'-Werror=sequence-point',
|
||||
'-Werror=trigraphs',
|
||||
'-Werror=write-strings',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wformat-security',
|
||||
'-Wformat=2',
|
||||
'-Wignored-qualifiers',
|
||||
'-Wimplicit-function-declaration',
|
||||
'-Wlogical-op',
|
||||
'-Wmissing-declarations',
|
||||
'-Wmissing-format-attribute',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Wmissing-noreturn',
|
||||
'-Wmissing-prototypes',
|
||||
'-Wnested-externs',
|
||||
'-Wold-style-definition',
|
||||
'-Wpointer-arith',
|
||||
'-Wshadow',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wtype-limits',
|
||||
'-Wundef',
|
||||
'-Wunused',
|
||||
]),
|
||||
],
|
||||
meson_version: '>= 0.50.0')
|
||||
|
||||
@ -51,6 +12,47 @@ gnome = import('gnome')
|
||||
i18n = import('i18n')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
common_cflags = cc.get_supported_arguments([
|
||||
'-fno-strict-aliasing',
|
||||
'-Wall',
|
||||
'-Wcast-align',
|
||||
'-Werror=address',
|
||||
'-Werror=array-bounds',
|
||||
'-Werror=empty-body',
|
||||
'-Werror=implicit',
|
||||
'-Werror=init-self',
|
||||
'-Werror=int-to-pointer-cast',
|
||||
'-Werror=main',
|
||||
'-Werror=missing-braces',
|
||||
'-Werror=nonnull',
|
||||
'-Werror=pointer-to-int-cast',
|
||||
'-Werror=redundant-decls',
|
||||
'-Werror=return-type',
|
||||
'-Werror=sequence-point',
|
||||
'-Werror=trigraphs',
|
||||
'-Werror=write-strings',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wformat-security',
|
||||
'-Wformat=2',
|
||||
'-Wignored-qualifiers',
|
||||
'-Wimplicit-function-declaration',
|
||||
'-Wlogical-op',
|
||||
'-Wmissing-declarations',
|
||||
'-Wmissing-format-attribute',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Wmissing-noreturn',
|
||||
'-Wmissing-prototypes',
|
||||
'-Wnested-externs',
|
||||
'-Wold-style-definition',
|
||||
'-Wpointer-arith',
|
||||
'-Wshadow',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wtype-limits',
|
||||
'-Wundef',
|
||||
'-Wunused',
|
||||
])
|
||||
add_project_arguments(common_cflags, language: 'c')
|
||||
|
||||
host_system = host_machine.system()
|
||||
glib_min_version = '2.56'
|
||||
libfprint_min_version = '1.90.1'
|
||||
|
||||
Reference in New Issue
Block a user