From dfd17cd89c3acb6c8698d3c2f849eaacc6cf6e76 Mon Sep 17 00:00:00 2001 From: Mathias Parger Date: Tue, 25 Jul 2023 09:21:01 +0200 Subject: [PATCH] moving c++20 standard specification to compiler flags section --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cf87470e781..6b95f932d573 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,6 @@ if (WIN32) # "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users # a choice to opt for the shared runtime if they want. option(USE_STATIC_CRT "Link against the static runtime libraries." ON) - set(CMAKE_CXX_STANDARD 20) # On Windows we need to instruct cmake to generate the .def in order to get the .lib required # when linking against dlls. CL.EXE will not generate .lib without .def file (or without pragma @@ -283,11 +282,11 @@ endif() # ================================================================================================== set(CXX_STANDARD "-std=c++17") if (WIN32) - set(CXX_STANDARD "/std:c++17") + set(CXX_STANDARD "/std:c++20") endif() if (MSVC) - set(CXX_STANDARD "/std:c++latest") + set(CXX_STANDARD "/std:c++20") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /W0 /Zc:__cplusplus") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations") @@ -453,7 +452,6 @@ endif() # By default, build with Vulkan support on desktop platforms, although clients must request to use # it at run time. -# if (WIN32 OR WEBGL OR IOS) if (WEBGL OR IOS) option(FILAMENT_SUPPORTS_VULKAN "Include the Vulkan backend" OFF) else()