diff --git a/premake5.lua b/premake5.lua index 8d35f25c2..32ac81550 100644 --- a/premake5.lua +++ b/premake5.lua @@ -42,7 +42,6 @@ end characterset("Unicode") flags({ - --"ExtraWarnings", -- Sets the compiler's maximum warning level. "FatalWarnings", -- Treat warnings as errors. }) @@ -117,8 +116,6 @@ filter({"platforms:Linux", "kind:*App"}) linkgroups("On") filter({"platforms:Linux", "language:C++", "toolset:gcc"}) - links({ - }) disablewarnings({ "unused-result" }) @@ -200,7 +197,7 @@ if not os.isdir("scratch") then os.mkdir("scratch") end -solution("xenia") +workspace("xenia") uuid("931ef4b0-6170-4f7a-aaf2-0fece7632747") startproject("xenia-app") if os.istarget("android") then @@ -240,6 +237,24 @@ solution("xenia") include("third_party/volk.lua") include("third_party/xxhash.lua") + if not os.istarget("android") then + -- SDL2 requires sdl2-config, and as of November 2020 isn't high-quality on + -- Android yet, most importantly in game controllers - the keycode and axis + -- enums are being ruined during conversion to SDL2 enums resulting in only + -- one controller (Nvidia Shield) being supported, digital triggers are also + -- not supported; lifecycle management (especially surface loss) is also + -- complicated. + include("third_party/SDL2.lua") + end + + -- Disable treating warnings as fatal errors for all third party projects: + for _, prj in ipairs(premake.api.scope.current.solution.projects) do + project(prj.name) + removeflags({ + "FatalWarnings", + }) + end + include("src/xenia") include("src/xenia/app/discord") include("src/xenia/apu") @@ -260,14 +275,6 @@ solution("xenia") include("src/xenia/vfs") if not os.istarget("android") then - -- SDL2 requires sdl2-config, and as of November 2020 isn't high-quality on - -- Android yet, most importantly in game controllers - the keycode and axis - -- enums are being ruined during conversion to SDL2 enums resulting in only - -- one controller (Nvidia Shield) being supported, digital triggers are also - -- not supported; lifecycle management (especially surface loss) is also - -- complicated. - include("third_party/SDL2.lua") - include("src/xenia/apu/sdl") include("src/xenia/helper/sdl") include("src/xenia/hid/sdl") diff --git a/third_party/capstone.lua b/third_party/capstone.lua index 647aaaa3b..6dc415974 100644 --- a/third_party/capstone.lua +++ b/third_party/capstone.lua @@ -3,8 +3,6 @@ project("capstone") uuid("b3a89f7e-bb02-4945-ae75-219caed6afa2") kind("StaticLib") language("C") - links({ - }) defines({ "CAPSTONE_X86_ATT_DISABLE", "CAPSTONE_DIET_NO", @@ -43,13 +41,3 @@ project("capstone") "capstone/**.c", "capstone/arch/X86/**.c", }) - - filter("platforms:Linux") - -- Capstone code is... not fantastic. - buildoptions({ - "-Wno-error=write-strings", - "-Wno-write-string", - "-Wno-deprecated", - "-w", - }) - filter({}) diff --git a/third_party/imgui.lua b/third_party/imgui.lua index 900e208a9..083947c14 100644 --- a/third_party/imgui.lua +++ b/third_party/imgui.lua @@ -23,8 +23,3 @@ project("imgui") "imgui/imstb_textedit.h", "imgui/imstb_truetype.h", }) - - filter("platforms:Windows") - buildoptions({ - "/wd4312", -- Ugh. - }) diff --git a/third_party/spirv-tools.lua b/third_party/spirv-tools.lua index 0e6335b98..6b3f66fa3 100644 --- a/third_party/spirv-tools.lua +++ b/third_party/spirv-tools.lua @@ -69,8 +69,3 @@ project("spirv-tools") "spirv-tools/source/util/bitutils.h", "spirv-tools/source/util/hex_float.h", }) - filter("platforms:Windows") - buildoptions({ - "/wd4800", -- Forcing value to bool 'true' or 'false' - "/wd4996", -- Call to 'std::equal' with parameters that may be unsafe - })