From 2c851498cc9493c4cf886d16b8ac1f40290447a5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 20 Dec 2023 17:40:47 +0100 Subject: [PATCH] meson.build: do not leak CPP macros to subprojects --- meson.build | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 57f339b9c..4e843a4f1 100644 --- a/meson.build +++ b/meson.build @@ -109,10 +109,13 @@ configure_file(output: 'Version.h', configuration: version_conf) conf = configuration_data() conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf')) -common_cppflags = [ +common_global_cppflags = [ '-D_GNU_SOURCE', ] +common_cppflags = [ +] + test_global_common_flags = [ '-fvisibility=hidden', ] @@ -259,8 +262,11 @@ if is_android subdir('android') endif -add_global_arguments(common_cppflags, language: 'c') -add_global_arguments(common_cppflags, language: 'cpp') +add_global_arguments(common_global_cppflags, language: 'c') +add_global_arguments(common_global_cppflags, language: 'cpp') + +add_project_arguments(common_cppflags, language: 'c') +add_project_arguments(common_cppflags, language: 'cpp') enable_daemon = not is_windows and not is_android and get_option('daemon') conf.set('ENABLE_DAEMON', enable_daemon)