Skip to content

Commit

Permalink
Disable a Clang warning on macOS generated by Check
Browse files Browse the repository at this point in the history
  • Loading branch information
clpo13 committed Apr 30, 2018
1 parent ca1032c commit 2273296
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ project('vinnie', 'c',
default_options : ['warning_level=3',
'c_std=c11'])

# Disable a Clang warning on macOS generated by Check
# https://github.com/libcheck/check/issues/58
disable_gnu_warning = []
if host_machine.system() == 'darwin'
if meson.get_compiler('c').get_id() == 'clang'
disable_gnu_warning = ['-Wno-gnu-zero-variadic-macro-arguments']
endif
endif

# Generate config.h file.
conf_data = configuration_data()
conf_data.set('version', meson.project_version())
Expand Down
3 changes: 2 additions & 1 deletion test/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
t_src = ['check_vinnie.c', '../src/vin.c']
t = executable('check_vinnie', t_src,
dependencies : check_dep,
include_directories : incdir)
include_directories : incdir,
c_args : disable_gnu_warning)

test('vinnie functions', t)

0 comments on commit 2273296

Please sign in to comment.