From 1c668513445691c036fa3b75bea99ad64b8b5bf3 Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 30 Sep 2019 23:23:47 +0000 Subject: [PATCH] gsdx_legacy: Silence very verbose clang warnings. (#3126) [107/641] Building CXX object plugins/GSdx_legacy/CMakeFiles/GSdx-legacy-1.0.0.dir/stdafx.cpp.o warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option] warning: unknown warning option '-Wno-packed-not-aligned'; did you mean '-Wno-over-aligned'? [-Wunknown-warning-option] 2 warnings generated. --- plugins/GSdx_legacy/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx_legacy/CMakeLists.txt b/plugins/GSdx_legacy/CMakeLists.txt index ad7ebda9a3..247ef48e4e 100644 --- a/plugins/GSdx_legacy/CMakeLists.txt +++ b/plugins/GSdx_legacy/CMakeLists.txt @@ -15,12 +15,17 @@ set(CommonFlags -Wno-unknown-pragmas -Wno-parentheses -Wunused-variable # __dummy variable need to be investigated - # The next two need to be looked at, but spam really badly in gcc 8. - # Largely class alignment in GSDevice.h and memcpy in GSVector*.h. - -Wno-class-memaccess - -Wno-packed-not-aligned ) +# The next two need to be looked at, but spam really badly in gcc 8. +# Largely class alignment in GSDevice.h and memcpy in GSVector*.h. +if(GCC_VERSION VERSION_EQUAL "8.0" OR GCC_VERSION VERSION_GREATER "8.0") + set(CommonFlags ${CommonFlags} + -Wno-packed-not-aligned + -Wno-class-memaccess + ) +endif() + set(GSdxFinalFlags ${CommonFlags}) if(XDG_STD)