From da41fa9b0d6b5b24326b73d2d0ea3cfb4e0145ce Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Apr 2023 21:03:07 -0400 Subject: Suppress cross-compilation warnings in MacOS builds --- .gitlab-ci.yml | 2 +- meson/suppressions/meson.build | 4 ++++ test/headers/meson.build | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67dfaad7..270b1ed2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,7 +127,7 @@ mac: stage: build tags: [macos] script: - - meson setup build -Dc_std=c11 -Dbuildtype=debug -Ddocs=disabled -Dwarning_level=3 -Dwerror=true + - meson setup build -Dc_std=c11 -Dbuildtype=debug -Ddocs=disabled -Dwarning_level=everything -Dwerror=true - ninja -C build test - meson configure -Dbuildtype=release build - ninja -C build test diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build index 46ed049c..22adecdc 100644 --- a/meson/suppressions/meson.build +++ b/meson/suppressions/meson.build @@ -33,6 +33,10 @@ if is_variable('cc') ] endif + if not meson.is_cross_build() + c_suppressions += ['-Wno-poison-system-directories'] + endif + elif cc.get_id() == 'gcc' c_suppressions += [ '-Wno-cast-align', diff --git a/test/headers/meson.build b/test/headers/meson.build index 78a48618..6cb14f6e 100644 --- a/test/headers/meson.build +++ b/test/headers/meson.build @@ -8,6 +8,11 @@ if get_option('warning_level') == 'everything' 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', -- cgit v1.2.1