File: meson.build

package info (click to toggle)
serd 0.32.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,856 kB
  • sloc: ansic: 7,477; python: 518; makefile: 5
file content (44 lines) | stat: -rw-r--r-- 930 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2020-2023 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC

header_c_suppressions = []

if get_option('warning_level') == 'everything'
  if cc.get_id() == 'clang'
    header_c_suppressions += [
      '-Wno-padded',
    ]

    if not meson.is_cross_build()
      header_c_suppressions += ['-Wno-poison-system-directories']
    endif

  elif cc.get_id() == 'gcc'
    header_c_suppressions += [
      '-Wno-padded',
      '-Wno-unused-const-variable',
    ]
  elif cc.get_id() == 'msvc'
    header_c_suppressions += [
      '/wd4820', # padding added after construct
    ]
  endif
endif

if cc.get_id() == 'clang'
  header_c_suppressions += [
    '-Wno-nullability-extension',
  ]
endif

test(
  'headers',
  executable(
    'test_headers',
    files('test_headers.c'),
    c_args: header_c_suppressions,
    dependencies: serd_dep,
    implicit_include_directories: false,
  ),
  suite: 'unit',
)