Permalink
Browse files

Add coverity flag to fix builds for coverity

Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
  • Loading branch information...
jdieter committed Sep 14, 2018
1 parent f5eca50 commit 4dc4a02a770e49fd33cba9712d7d0cf2288f945c
Showing with 14 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +12 −1 meson.build
  3. +1 −0 meson_options.txt
@@ -1,3 +1,4 @@
cov-int
build
test/abi/new
test/abi/stable/ABI.dump
@@ -11,6 +11,15 @@ common_cflags = [
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(common_cflags), language : 'c')

# Fix coverity bug, shamelessly stolen from libinput
if get_option('coverity')
add_project_arguments('-D_Float128=__uint128_t', language : 'c')
add_project_arguments('-D_Float32x=int', language : 'c')
add_project_arguments('-D_Float32=int', language : 'c')
add_project_arguments('-D_Float64x=long', language : 'c')
add_project_arguments('-D_Float64=long', language : 'c')
endif

if get_option('with-zstd') == 'disabled'
zstd_dep = dependency('', required : false)
else
@@ -35,7 +44,9 @@ inc = include_directories('include')

subdir('include')
subdir('src')
subdir('test')
if not get_option('coverity')
subdir('test')
endif

pkg_mod = import('pkgconfig')
pkg_mod.generate(libraries : zcklib,
@@ -1,2 +1,3 @@
option('with-zstd', type : 'combo', choices : ['enabled', 'disabled', 'auto'], value : 'auto')
option('with-openssl', type : 'combo', choices : ['enabled', 'disabled', 'auto'], value : 'auto')
option('coverity', type : 'boolean', value : false)

0 comments on commit 4dc4a02

Please sign in to comment.