Skip to content

Commit dfd17cd

Browse files
committed
moving c++20 standard specification to compiler flags section
1 parent a857ec9 commit dfd17cd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ if (WIN32)
166166
# "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users
167167
# a choice to opt for the shared runtime if they want.
168168
option(USE_STATIC_CRT "Link against the static runtime libraries." ON)
169-
set(CMAKE_CXX_STANDARD 20)
170169

171170
# On Windows we need to instruct cmake to generate the .def in order to get the .lib required
172171
# when linking against dlls. CL.EXE will not generate .lib without .def file (or without pragma
@@ -283,11 +282,11 @@ endif()
283282
# ==================================================================================================
284283
set(CXX_STANDARD "-std=c++17")
285284
if (WIN32)
286-
set(CXX_STANDARD "/std:c++17")
285+
set(CXX_STANDARD "/std:c++20")
287286
endif()
288287

289288
if (MSVC)
290-
set(CXX_STANDARD "/std:c++latest")
289+
set(CXX_STANDARD "/std:c++20")
291290
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /W0 /Zc:__cplusplus")
292291
else()
293292
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()
453452

454453
# By default, build with Vulkan support on desktop platforms, although clients must request to use
455454
# it at run time.
456-
# if (WIN32 OR WEBGL OR IOS)
457455
if (WEBGL OR IOS)
458456
option(FILAMENT_SUPPORTS_VULKAN "Include the Vulkan backend" OFF)
459457
else()

0 commit comments

Comments
 (0)