diff options
author | David Robillard <d@drobilla.net> | 2022-06-29 09:04:27 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-20 16:24:23 -0400 |
commit | 127ded1247765f9ee0db061bf81cf1d2f0088917 (patch) | |
tree | 2659f0c5e4aef02846545c8e4a950406fc62d14c /test/meson.build | |
parent | 8571ffc9f4ad9165dde3407641e73ec7737ae42c (diff) | |
download | raul-127ded1247765f9ee0db061bf81cf1d2f0088917.tar.gz raul-127ded1247765f9ee0db061bf81cf1d2f0088917.tar.bz2 raul-127ded1247765f9ee0db061bf81cf1d2f0088917.zip |
Add header warning test
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build index 2321712..8411377 100644 --- a/test/meson.build +++ b/test/meson.build @@ -13,6 +13,43 @@ if not get_option('tests').disabled() and not meson.is_subproject() endif endif +################### +# Header Warnings # +################### + +header_args = [] +if cpp.get_id() == 'clang' + header_args += [ + '-Wno-c++17-extensions', + '-Wno-padded', + '-Wno-weak-vtables', + ] +elif cpp.get_id() == 'gcc' + header_args += [ + '-Wno-abi-tag', + '-Wno-multiple-inheritance', + '-Wno-padded', + '-Wno-switch-default', + '-Wno-useless-cast', + ] +elif cpp.get_id() == 'msvc' + header_args += [ + '/wd4626', # assignment operator implicitly deleted + '/wd5027', # move assignment operator implicitly deleted + ] +endif + +# Test that headers have (almost) no warnings (ignoring usual suppressions) +test( + 'test_headers', + executable( + 'test_headers', + files('headers/test_headers.cpp'), + cpp_args: header_args, + dependencies: raul_dep, + ), +) + ############## # Unit Tests # ############## |