File: meson.build

package info (click to toggle)
libomemo-c 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,092 kB
  • sloc: ansic: 25,957; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 949 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
project('libomemo-c', 'c', license: 'GPL-3.0', version: '0.5.1', meson_version: '>=1.1.0')

cc = meson.get_compiler('c')


c_args = []
if cc.has_function('SecureZeroMemory', prefix: '#include <Windows.h>')
    c_args += ['-DSECUREZEROMEMORY']
endif
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
    c_args += ['-fmessage-length=0', '-Wall', '-Wmissing-field-initializers', '-Wno-missing-braces', '-Wparentheses']
endif
if cc.get_id() == 'gcc'
    c_args += ['-Wsign-compare']
    if cc.has_argument('-Wsign-conversion')
        c_args += ['-Wsign-conversion']
    endif
endif
if cc.get_id() == 'clang'
    c_args += ['-Wswitch', '-Wunused-variable', '-Wunused-value', '-Wshadow', '-Wint-conversion',  '-Wpointer-sign', '-Wprotocol', '-Wshorten-64-to-32']
endif
if cc.has_function('memset_s', prefix: '#include <string.h>')
    c_args += ['-DHAVE_MEMSET_S']
endif

subdir('protobuf')
subdir('src')
if get_option('tests')
    subdir('tests')
endif