diff options
author | David Robillard <d@drobilla.net> | 2022-11-02 14:17:42 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-11-02 14:26:55 -0400 |
commit | 5590b407f8077c1ef0a25cd2948f973000b32683 (patch) | |
tree | 2fecba790a7117a3669240bb1218af0c9d9e6f18 | |
parent | 288b82c1f401d17dc928ac11b0744321381ccfa3 (diff) | |
download | zix-5590b407f8077c1ef0a25cd2948f973000b32683.tar.gz zix-5590b407f8077c1ef0a25cd2948f973000b32683.tar.bz2 zix-5590b407f8077c1ef0a25cd2948f973000b32683.zip |
Suppress warnings in C++ test
This is necessary because the global warnings may be stricter when building as
a subproject.
-rw-r--r-- | meson.build | 13 | ||||
-rw-r--r-- | test/cpp/test_headers_cpp.cpp | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 21b2aa6..bc084b4 100644 --- a/meson.build +++ b/meson.build @@ -476,7 +476,9 @@ if not get_option('tests').disabled() cpp_test_args = [] if cpp.get_id() == 'clang' cpp_test_args = [ - '-Wall', + '-Weverything', + '-Wno-c++98-compat', + '-Wno-c++98-compat-pedantic', '-Wno-nullability-extension', '-Wno-padded', '-Wno-zero-as-null-pointer-constant', @@ -488,7 +490,14 @@ if not get_option('tests').disabled() '-Wno-unused-const-variable', ] elif cpp.get_id() == 'msvc' - cpp_test_args = ['/W3'] + cpp_test_args = [ + '/Wall', + '/wd4514', # unreferenced inline function has been removed + '/wd4710', # function not inlined + '/wd4711', # function selected for automatic inline expansion + '/wd4820', # padding added after construct + '/wd5039', # throwing function passed to C (winbase.h) + ] endif test( diff --git a/test/cpp/test_headers_cpp.cpp b/test/cpp/test_headers_cpp.cpp index 0d55be9..7c9a1df 100644 --- a/test/cpp/test_headers_cpp.cpp +++ b/test/cpp/test_headers_cpp.cpp @@ -1,6 +1,10 @@ // Copyright 2022 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC +#ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN 1 +#endif + #include "zix/allocator.h" // IWYU pragma: keep #include "zix/attributes.h" // IWYU pragma: keep #include "zix/bitset.h" // IWYU pragma: keep |