diff --git a/meson.build b/meson.build index c22e92626..52e829ac0 100644 --- a/meson.build +++ b/meson.build @@ -144,13 +144,14 @@ deps = [] conf = configuration_data() incconfig = include_directories('.') -cpp_args = ['-DHAVE_CONFIG_H'] + +add_project_arguments('-DHAVE_CONFIG_H', language: ['c', 'cpp']) warn_cflags = [ '-Wno-non-virtual-dtor', ] -cpp_args += cpp.get_supported_arguments(warn_cflags) +cpp_args = cpp.get_supported_arguments(warn_cflags) if m_dep.found() deps += [m_dep] diff --git a/test/api/meson.build b/test/api/meson.build index 0a9ade6ea..6258915bb 100644 --- a/test/api/meson.build +++ b/test/api/meson.build @@ -45,10 +45,9 @@ if conf.get('HAVE_GLIB', 0) == 1 opts = test_data.length() > 1 ? test_data[1] : {} extra_c_args = opts.get('c_args', []) - - test_name = fname.split('.')[0].underscorify() exe = executable(test_name, fname, + c_args: extra_c_args, cpp_args: cpp_args + extra_c_args, include_directories: [incconfig, incsrc], dependencies: deps,