test/meson.build: add -Wno-unused-command-line-argument for clang 9+

This commit is contained in:
Max Kellermann 2020-02-04 16:35:44 +01:00
parent 535a099a27
commit f1ad21d2bf
1 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,14 @@ if compiler.get_id() == 'gcc'
]
endif
if compiler.get_id() == 'clang' and compiler.version().version_compare('>=9')
gtest_compile_args += [
# work around clang warning caused by GTest's wrong "-lpthread"
# compiler flag
'-Wno-unused-command-line-argument',
]
endif
gtest_dep = declare_dependency(
dependencies: [dependency('gtest', main: true)],
compile_args: gtest_compile_args,