From f7f3b1daededcfd6900e42db21be3bb5a163aabf Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Sat, 29 Mar 2025 13:55:42 -0400 Subject: [PATCH] Explicitly set c++ version per-project. Set RecastDemo and Tests projects to C++20 We don't care as much about ultra-compatibility with RecastDemo or Tests. C++20 seems fairly universal at this point considering Unreal 5 ships with it as the default requirement. We want to keep the other stuff to C++98 still because eventaully we'll convert it to C99 and not having a ton of modern C++ features everywhere make it significantly easier. --- RecastDemo/premake5.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RecastDemo/premake5.lua b/RecastDemo/premake5.lua index f02398ed..076fc8c6 100644 --- a/RecastDemo/premake5.lua +++ b/RecastDemo/premake5.lua @@ -25,7 +25,6 @@ workspace "recastnavigation" rtti "Off" symbols "On" flags { "FatalCompileWarnings" } - cppdialect "C++98" -- debug configs filter "configurations:Debug" @@ -58,6 +57,7 @@ workspace "recastnavigation" project "DebugUtils" language "C++" + cppdialect "C++98" kind "StaticLib" includedirs { "../DebugUtils/Include", @@ -72,6 +72,7 @@ project "DebugUtils" project "Detour" language "C++" + cppdialect "C++98" kind "StaticLib" includedirs { "../Detour/Include" @@ -89,6 +90,7 @@ project "Detour" project "DetourCrowd" language "C++" + cppdialect "C++98" kind "StaticLib" includedirs { "../DetourCrowd/Include", @@ -102,6 +104,7 @@ project "DetourCrowd" project "DetourTileCache" language "C++" + cppdialect "C++98" kind "StaticLib" includedirs { "../DetourTileCache/Include", @@ -115,6 +118,7 @@ project "DetourTileCache" project "Recast" language "C++" + cppdialect "C++98" kind "StaticLib" includedirs { "../Recast/Include" @@ -126,6 +130,7 @@ project "Recast" project "RecastDemo" language "C++" + cppdialect "C++20" -- we don't care about this being compatible in the same way we do with the library code. kind "WindowedApp" includedirs { "../RecastDemo/Include", @@ -203,8 +208,8 @@ project "RecastDemo" project "Tests" language "C++" + cppdialect "C++20" -- Catch requires newer C++ features kind "ConsoleApp" - cppdialect "C++14" -- Catch requires newer C++ features -- Catch requires RTTI and exceptions exceptionhandling "On"