diff --git a/meson.build b/meson.build index 28913600d2..ffb0cb87dc 100644 --- a/meson.build +++ b/meson.build @@ -750,6 +750,13 @@ if enable_nm_cloud_setup endif more_asserts = get_option('more_asserts') +if more_asserts == 'auto' + if nm_minor_version % 2 == 0 + more_asserts = 'no' + else + more_asserts = 'all' + endif +endif if more_asserts == 'no' more_asserts = 0 elif more_asserts == 'all' diff --git a/meson_options.txt b/meson_options.txt index 8d243974d3..d4f62829fa 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -63,7 +63,7 @@ option('vapi', type : 'combo', choices : ['auto', 'true', 'false'], description: option('docs', type: 'boolean', value: false, description: 'use to build documentation') option('tests', type: 'combo', choices: ['yes', 'no', 'root'], value: 'yes', description: 'Build NetworkManager tests') option('firewalld_zone', type: 'boolean', value: true, description: 'Install and use firewalld zone for shared mode') -option('more_asserts', type: 'string', value: 'all', description: 'Enable more assertions for debugging (0 = no, 100 = all, default: all)') +option('more_asserts', type: 'string', value: 'auto', description: 'Enable more assertions for debugging (0 = no, 100 = all, default: auto)') option('more_logging', type: 'boolean', value: true, description: 'Enable more debug logging') option('valgrind', type: 'array', value: ['no'], description: 'Use valgrind to memory-check the tests') option('valgrind_suppressions', type: 'string', value: '', description: 'Use specific valgrind suppression file')