From e6b675bb9a302c93a28104a0b36ac1d4f75be37d Mon Sep 17 00:00:00 2001 From: Siddharth J Singh Date: Wed, 9 Nov 2022 22:24:56 +0530 Subject: [PATCH] Fastlz fix for -Wno-class-memaccess' is valid for C++/ObjC++ but not for C (#479) * Added a selective filter for *.c files compiled on linux using make Co-authored-by: Graham Pentheny --- RecastDemo/premake5.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RecastDemo/premake5.lua b/RecastDemo/premake5.lua index 5dc6847..ce7ce51 100644 --- a/RecastDemo/premake5.lua +++ b/RecastDemo/premake5.lua @@ -156,8 +156,6 @@ project "RecastDemo" "`pkg-config --cflags gl`", "`pkg-config --cflags glu`", "-Wno-ignored-qualifiers", - "-Wno-error=class-memaccess" - } linkoptions { "`pkg-config --libs sdl2`", @@ -165,6 +163,11 @@ project "RecastDemo" "`pkg-config --libs glu`" } + filter { "system:linux", "action:gmake*", "files:*.c" } + buildoptions { + "-Wno-class-memaccess" + } + -- windows library cflags and libs filter "system:windows" includedirs { "../RecastDemo/Contrib/SDL/include" }