From 4dd5e0cf13bf655d87bc3f53d64a8f7fb4a2af4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Fri, 3 Jun 2022 15:48:32 -0400 Subject: [PATCH] meson: Add coverity flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- meson.build | 4 ++++ meson_options.txt | 3 +++ 2 files changed, 7 insertions(+) diff --git a/meson.build b/meson.build index 0550f0cd8..c7c11f666 100644 --- a/meson.build +++ b/meson.build @@ -128,6 +128,7 @@ endif # Custom configuration. cgrouppattern = get_option('cgroup-pattern') +coverity = get_option('coverity-build') init_script = get_option('init-script') want_examples = get_option('examples') want_io_uring = get_option('io-uring-event-loop') @@ -137,6 +138,9 @@ want_tests = get_option('tests') want_tools = get_option('tools') srcconf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern) +if coverity + srcconf.set('ENABLE_COVERITY_BUILD', 1) +endif dummy_config_data = configuration_data() dummy_config_data.set_quoted('DUMMY_VARIABLE', '1') diff --git a/meson_options.txt b/meson_options.txt index 6459cb7f9..ac07d246b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,9 @@ option('cgroup-pattern', type: 'string', value: '', description: 'CGroup pattern') +option('coverity-build', type: 'boolean', value: 'true', + description: 'build for coverity') + option('examples', type: 'boolean', value: 'true', description: 'build and install examples')