From ea7bfbee709b7a2467ccf96a1bb34523fdf1b5a2 Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Fri, 11 Nov 2022 20:11:14 -0500 Subject: [PATCH] Fix clang linux builds (#578) Also remove hard-coded filter on gmake premake target since it's deprecated in favor of gmake2. It also doesn't matter; what matters is that we filter on gcc, since the warnings we've disabled don't exist in clang and will throw errors. --- RecastDemo/premake5.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/RecastDemo/premake5.lua b/RecastDemo/premake5.lua index ce7ce51..8330b06 100644 --- a/RecastDemo/premake5.lua +++ b/RecastDemo/premake5.lua @@ -75,9 +75,10 @@ project "Detour" "../Detour/Source/*.cpp" } -- linux library cflags and libs - filter {"system:linux", "action:gmake"} + filter {"system:linux", "toolset:gcc"} buildoptions { - "-Wno-error=class-memaccess" + "-Wno-error=class-memaccess", + "-Wno-error=maybe-uninitialized" } project "DetourCrowd" @@ -130,7 +131,7 @@ project "RecastDemo" "../DetourTileCache/Include", "../Recast/Include" } - files { + files { "../RecastDemo/Include/*.h", "../RecastDemo/Source/*.cpp", "../RecastDemo/Contrib/fastlz/*.h", @@ -138,7 +139,7 @@ project "RecastDemo" } -- project dependencies - links { + links { "DebugUtils", "Detour", "DetourCrowd", @@ -150,7 +151,7 @@ project "RecastDemo" targetdir "Bin" -- linux library cflags and libs - filter {"system:linux", "action:gmake"} + filter "system:linux" buildoptions { "`pkg-config --cflags sdl2`", "`pkg-config --cflags gl`", @@ -163,7 +164,7 @@ project "RecastDemo" "`pkg-config --libs glu`" } - filter { "system:linux", "action:gmake*", "files:*.c" } + filter { "system:linux", "toolset:gcc", "files:*.c" } buildoptions { "-Wno-class-memaccess" } @@ -238,8 +239,8 @@ project "Tests" targetdir "Bin" -- linux library cflags and libs - filter {"system:linux", "action:gmake"} - buildoptions { + filter "system:linux" + buildoptions { "`pkg-config --cflags sdl2`", "`pkg-config --cflags gl`", "`pkg-config --cflags glu`", @@ -248,7 +249,8 @@ project "Tests" linkoptions { "`pkg-config --libs sdl2`", "`pkg-config --libs gl`", - "`pkg-config --libs glu`" + "`pkg-config --libs glu`", + "-lpthread" } -- windows library cflags and libs