mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
Merge branch 'fix-gio-test-build' into 'master'
Meson: Fix build error in gdbus-example-objectmanager See merge request GNOME/glib!461
This commit is contained in:
commit
9534447eb0
@ -5,6 +5,13 @@ common_gio_tests_deps = [
|
|||||||
libgio_dep,
|
libgio_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
test_c_args = [
|
||||||
|
'-DG_LOG_DOMAIN="GLib-GIO"',
|
||||||
|
'-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
|
||||||
|
'-DGLIB_MKENUMS="@0@"'.format(glib_mkenums),
|
||||||
|
'-DGLIB_COMPILE_SCHEMAS="@0@"'.format(glib_compile_schemas.full_path()),
|
||||||
|
]
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
|
common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
|
||||||
endif
|
endif
|
||||||
@ -85,13 +92,6 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|||||||
test_env.set('GIO_MODULE_DIR', '')
|
test_env.set('GIO_MODULE_DIR', '')
|
||||||
test_env.set('GIO_LAUNCH_DESKTOP', meson.build_root() + '/gio/gio-launch-desktop')
|
test_env.set('GIO_LAUNCH_DESKTOP', meson.build_root() + '/gio/gio-launch-desktop')
|
||||||
|
|
||||||
test_c_args = [
|
|
||||||
'-DG_LOG_DOMAIN="GLib-GIO"',
|
|
||||||
'-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
|
|
||||||
'-DGLIB_MKENUMS="@0@"'.format(glib_mkenums),
|
|
||||||
'-DGLIB_COMPILE_SCHEMAS="@0@"'.format(glib_compile_schemas.full_path()),
|
|
||||||
]
|
|
||||||
|
|
||||||
# Check for libdbus1 - Optional - is only used in the GDBus test cases
|
# Check for libdbus1 - Optional - is only used in the GDBus test cases
|
||||||
# 1.2.14 required for dbus_message_set_serial
|
# 1.2.14 required for dbus_message_set_serial
|
||||||
dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14')
|
dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14')
|
||||||
|
14
meson.build
14
meson.build
@ -345,7 +345,7 @@ endforeach
|
|||||||
|
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
||||||
test_c_args = [
|
warning_c_args = [
|
||||||
'-Wall',
|
'-Wall',
|
||||||
'-Wduplicated-branches',
|
'-Wduplicated-branches',
|
||||||
'-Wimplicit-fallthrough',
|
'-Wimplicit-fallthrough',
|
||||||
@ -363,18 +363,18 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|||||||
'-Werror=missing-prototypes',
|
'-Werror=missing-prototypes',
|
||||||
'-Werror=pointer-arith',
|
'-Werror=pointer-arith',
|
||||||
]
|
]
|
||||||
test_c_link_args = [
|
warning_c_link_args = [
|
||||||
'-Wl,-z,nodelete',
|
'-Wl,-z,nodelete',
|
||||||
]
|
]
|
||||||
if get_option('bsymbolic_functions')
|
if get_option('bsymbolic_functions')
|
||||||
test_c_link_args += ['-Wl,-Bsymbolic-functions']
|
warning_c_link_args += ['-Wl,-Bsymbolic-functions']
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
test_c_args = []
|
warning_c_args = []
|
||||||
test_c_link_args = []
|
warning_c_link_args = []
|
||||||
endif
|
endif
|
||||||
|
|
||||||
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
|
add_project_arguments(cc.get_supported_arguments(warning_c_args), language: 'c')
|
||||||
|
|
||||||
# FIXME: We cannot build some of the GResource tests with -z nodelete, which
|
# FIXME: We cannot build some of the GResource tests with -z nodelete, which
|
||||||
# means we cannot use that flag in add_project_link_arguments(), and must add
|
# means we cannot use that flag in add_project_link_arguments(), and must add
|
||||||
@ -382,7 +382,7 @@ add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
|
|||||||
# because that is what the autotools build did.
|
# because that is what the autotools build did.
|
||||||
# See https://github.com/mesonbuild/meson/pull/3520 for a way to eventually
|
# See https://github.com/mesonbuild/meson/pull/3520 for a way to eventually
|
||||||
# improve this.
|
# improve this.
|
||||||
glib_link_flags = cc.get_supported_link_arguments(test_c_link_args)
|
glib_link_flags = cc.get_supported_link_arguments(warning_c_link_args)
|
||||||
|
|
||||||
# Windows Support (7+)
|
# Windows Support (7+)
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
|
Loading…
Reference in New Issue
Block a user