From: Fred Morcos Date: Tue, 4 Jun 2024 11:42:53 +0000 (+0200) Subject: Auth/meson: Don't fail if compiler doesn't support trivial-auto-var-init X-Git-Tag: rec-5.1.0-beta1~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34bf17482c637ef017e85dd5bcdb57991d7edd4e;p=thirdparty%2Fpdns.git Auth/meson: Don't fail if compiler doesn't support trivial-auto-var-init --- diff --git a/meson/auto-var-init/meson.build b/meson/auto-var-init/meson.build index 1d528437ea..56c3ade41f 100644 --- a/meson/auto-var-init/meson.build +++ b/meson/auto-var-init/meson.build @@ -2,12 +2,12 @@ auto_var_init = get_option('auto-var-init') if auto_var_init != 'disabled' arg = '-ftrivial-auto-var-init=' + auto_var_init - if not cxx.has_argument(arg) - error('Compiler does not support ' + arg + ', which is needed for automatic variable initialization') - subdir_done() + if cxx.has_argument(arg) + add_project_arguments(arg, language: ['c', 'cpp']) + else + warning('Compiler does not support ' + arg + ', which is needed for automatic variable initialization') + auto_var_init = 'unsupported by compiler' endif - - add_project_arguments(arg, language: ['c', 'cpp']) endif summary('Auto Var Init', auto_var_init, section: 'Configuration')