From c19d0355eb80e6a4a3aa7404777737a3aa54993e Mon Sep 17 00:00:00 2001 From: ZeldaZach Date: Fri, 13 Dec 2024 22:16:46 -0500 Subject: [PATCH] Support C++20 Standard --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b6af504c..93c001ddf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,9 +81,9 @@ if(NOT DEFINED GIT_TAG_RELEASENAME) set(GIT_TAG_RELEASENAME "Rings of the Wild") endif() -# Use c++17 for all targets +# Use c++20 for all targets set(CMAKE_CXX_STANDARD - 17 + 20 CACHE STRING "C++ ISO Standard" ) set(CMAKE_CXX_STANDARD_REQUIRED True) @@ -140,8 +140,8 @@ endif() # Define proper compilation flags if(MSVC) - # Visual Studio: Disable Warning C4251, C++17 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics - set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++17 /permissive- /W4 /MP /EHsc") + # Visual Studio: Disable Warning C4251, C++20 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics + set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc") # Visual Studio: Maximum Optimization, Multi-threaded DLL set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD") # Visual Studio: No Optimization, Multi-threaded Debug DLL, Debug Symbols @@ -158,7 +158,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) endif() if(APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++20") endif() set(ADDITIONAL_DEBUG_FLAGS