mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
parent
f62be5660d
commit
c71d0c53b5
@ -19,14 +19,10 @@
|
|||||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||||
* file for a list of people on the GLib Team. See the ChangeLog
|
* file for a list of people on the GLib Team. See the ChangeLog
|
||||||
* files for a list of changes. These files are distributed with
|
* files for a list of changes. These files are distributed with
|
||||||
* GLib at ftp://ftp.gtk.org/pub/gtk/.
|
* GLib at ftp://ftp.gtk.org/pub/gtk/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef G_DISABLE_ASSERT
|
|
||||||
#undef G_LOG_DOMAIN
|
|
||||||
|
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
G_MODULE_EXPORT void gplugin_a_func (void);
|
G_MODULE_EXPORT void gplugin_a_func (void);
|
||||||
G_MODULE_EXPORT void gplugin_clash_func (void);
|
G_MODULE_EXPORT void gplugin_clash_func (void);
|
@ -19,12 +19,9 @@
|
|||||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||||
* file for a list of people on the GLib Team. See the ChangeLog
|
* file for a list of people on the GLib Team. See the ChangeLog
|
||||||
* files for a list of changes. These files are distributed with
|
* files for a list of changes. These files are distributed with
|
||||||
* GLib at ftp://ftp.gtk.org/pub/gtk/.
|
* GLib at ftp://ftp.gtk.org/pub/gtk/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef G_DISABLE_ASSERT
|
|
||||||
#undef G_LOG_DOMAIN
|
|
||||||
|
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
|
|
||||||
G_MODULE_EXPORT gchar* gplugin_b_state;
|
G_MODULE_EXPORT gchar* gplugin_b_state;
|
@ -2,8 +2,40 @@ gmodule_tests = {
|
|||||||
'cxx' : {
|
'cxx' : {
|
||||||
'source' : ['cxx.cpp'],
|
'source' : ['cxx.cpp'],
|
||||||
},
|
},
|
||||||
|
'module-test-library' : {
|
||||||
|
'export_dynamic' : true,
|
||||||
|
'source': 'module-test.c',
|
||||||
|
'c_args': ['-DMODULE_TYPE="library"'],
|
||||||
|
},
|
||||||
|
'module-test-plugin' : {
|
||||||
|
'export_dynamic' : true,
|
||||||
|
'source': 'module-test.c',
|
||||||
|
'c_args': ['-DMODULE_TYPE="plugin"'],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module_suffix = []
|
||||||
|
# Keep the autotools convention for shared module suffix because GModule
|
||||||
|
# depends on it: https://gitlab.gnome.org/GNOME/glib/issues/520
|
||||||
|
if ['darwin', 'ios'].contains(host_machine.system())
|
||||||
|
module_suffix = 'so'
|
||||||
|
endif
|
||||||
|
|
||||||
|
foreach module : ['moduletestplugin_a', 'moduletestplugin_b']
|
||||||
|
shared_module(module + '_plugin', 'lib@0@.c'.format(module),
|
||||||
|
dependencies : [libglib_dep, libgmodule_dep],
|
||||||
|
install_dir : installed_tests_execdir,
|
||||||
|
install : installed_tests_enabled,
|
||||||
|
name_suffix : module_suffix
|
||||||
|
)
|
||||||
|
shared_library(module + '_library', 'lib@0@.c'.format(module),
|
||||||
|
dependencies : [libglib_dep, libgmodule_dep],
|
||||||
|
install_dir : installed_tests_execdir,
|
||||||
|
install : installed_tests_enabled,
|
||||||
|
name_suffix : module_suffix
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment()
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||||
@ -35,6 +67,7 @@ foreach test_name, extra_args : gmodule_tests
|
|||||||
c_args : test_cargs + extra_args.get('c_args', []),
|
c_args : test_cargs + extra_args.get('c_args', []),
|
||||||
link_args : extra_args.get('link_args', []),
|
link_args : extra_args.get('link_args', []),
|
||||||
dependencies : test_deps + extra_args.get('dependencies', []),
|
dependencies : test_deps + extra_args.get('dependencies', []),
|
||||||
|
export_dynamic : extra_args.get('export_dynamic', false),
|
||||||
install_dir: installed_tests_execdir,
|
install_dir: installed_tests_execdir,
|
||||||
install: install,
|
install: install,
|
||||||
)
|
)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
# define MODULE_FILENAME_PREFIX "lib"
|
# define MODULE_FILENAME_PREFIX "lib"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gchar* global_state;
|
gchar *global_state = NULL;
|
||||||
|
|
||||||
G_MODULE_EXPORT void g_clash_func (void);
|
G_MODULE_EXPORT void g_clash_func (void);
|
||||||
|
|
@ -15,20 +15,7 @@ test_cargs = ['-DG_LOG_DOMAIN="GLib"', '-UG_DISABLE_ASSERT']
|
|||||||
subdir('gobject')
|
subdir('gobject')
|
||||||
subdir('refcount')
|
subdir('refcount')
|
||||||
|
|
||||||
tests = {
|
tests = {}
|
||||||
'module-test-library' : {
|
|
||||||
'dependencies' : [libgmodule_dep],
|
|
||||||
'export_dynamic' : true,
|
|
||||||
'source': 'module-test.c',
|
|
||||||
'c_args': ['-DMODULE_TYPE="library"'],
|
|
||||||
},
|
|
||||||
'module-test-plugin' : {
|
|
||||||
'dependencies' : [libgmodule_dep],
|
|
||||||
'export_dynamic' : true,
|
|
||||||
'source': 'module-test.c',
|
|
||||||
'c_args': ['-DMODULE_TYPE="plugin"'],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
test_extra_programs = {
|
test_extra_programs = {
|
||||||
'slice-test' : {
|
'slice-test' : {
|
||||||
@ -37,28 +24,6 @@ test_extra_programs = {
|
|||||||
'assert-msg-test' : {},
|
'assert-msg-test' : {},
|
||||||
}
|
}
|
||||||
|
|
||||||
module_suffix = []
|
|
||||||
# Keep the autotools convention for shared module suffix because GModule
|
|
||||||
# depends on it: https://gitlab.gnome.org/GNOME/glib/issues/520
|
|
||||||
if ['darwin', 'ios'].contains(host_machine.system())
|
|
||||||
module_suffix = 'so'
|
|
||||||
endif
|
|
||||||
|
|
||||||
foreach module : ['moduletestplugin_a', 'moduletestplugin_b']
|
|
||||||
shared_module(module + '_plugin', 'lib@0@.c'.format(module),
|
|
||||||
dependencies : [libglib_dep, libgmodule_dep],
|
|
||||||
install_dir : installed_tests_execdir,
|
|
||||||
install : installed_tests_enabled,
|
|
||||||
name_suffix : module_suffix
|
|
||||||
)
|
|
||||||
shared_library(module + '_library', 'lib@0@.c'.format(module),
|
|
||||||
dependencies : [libglib_dep, libgmodule_dep],
|
|
||||||
install_dir : installed_tests_execdir,
|
|
||||||
install : installed_tests_enabled,
|
|
||||||
name_suffix : module_suffix
|
|
||||||
)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
||||||
common_deps = [libm, thread_dep, libglib_dep]
|
common_deps = [libm, thread_dep, libglib_dep]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user