summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-09-13 18:26:40 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-09-15 01:18:40 +0200
commit1cbe7a6734f457c9040a728121225ab65c567a65 (patch)
tree156577352ded3fa39e10bab57a23148804fcddcc /gmodule
parenta20a36b26fd427810bb2b3098c26b587824bdc6d (diff)
downloadglib-1cbe7a6734f457c9040a728121225ab65c567a65.tar.gz
meson: Build C++ tests for the currently supported C++ standard versions
We've various macros definitions that are depending using C++ features that may not work in all the standard versions, so recompile the cxx tests that we have in all the ones we want to support.
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/tests/meson.build13
1 files changed, 13 insertions, 0 deletions
diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build
index cc8125eda..fd2257c1a 100644
--- a/gmodule/tests/meson.build
+++ b/gmodule/tests/meson.build
@@ -15,8 +15,19 @@ if have_cxx
gmodule_tests += {
'cxx' : {
'source' : ['cxx.cpp'],
+ 'suite' : ['cpp'],
}
}
+
+ foreach std, arg: cxx_standards
+ gmodule_tests += {
+ 'cxx-@0@'.format(std) : {
+ 'source' : ['cxx.cpp'],
+ 'suite' : ['cpp'],
+ 'cpp_args' : [arg],
+ },
+ }
+ endforeach
endif
module_suffix = []
@@ -49,6 +60,7 @@ test_env.set('MALLOC_CHECK_', '2')
test_deps = [libm, thread_dep, libglib_dep, libgmodule_dep]
test_cargs = ['-DG_LOG_DOMAIN="GModule"', '-UG_DISABLE_ASSERT']
+test_cpp_args = test_cargs
foreach test_name, extra_args : gmodule_tests
source = extra_args.get('source', test_name + '.c')
@@ -69,6 +81,7 @@ foreach test_name, extra_args : gmodule_tests
exe = executable(test_name, source,
c_args : test_cargs + extra_args.get('c_args', []),
+ cpp_args : test_cpp_args + extra_args.get('cpp_args', []),
link_args : extra_args.get('link_args', []),
dependencies : test_deps + extra_args.get('dependencies', []),
export_dynamic : extra_args.get('export_dynamic', false),