Skip to content

Commit

Permalink
moving c++20 standard specification to compiler flags section
Browse files Browse the repository at this point in the history
  • Loading branch information
dabeschte authored and pixelflinger committed Jul 31, 2023
1 parent 7bb59a6 commit cc895ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit cc895ea

Please sign in to comment.