mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
Build: Switch to C++20
This commit is contained in:
parent
9b47561c89
commit
58b4946fb9
|
@ -142,9 +142,7 @@ if(ANDROID)
|
|||
endif()
|
||||
|
||||
|
||||
# Detect C++ version support.
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
# Warning disables.
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
include(CheckCXXFlag)
|
||||
check_cxx_flag(-Wall COMPILER_SUPPORTS_WALL)
|
||||
|
@ -229,8 +227,16 @@ if(BUILD_TESTS)
|
|||
enable_testing()
|
||||
endif()
|
||||
|
||||
# Use C++17 for building dependencies (some aren't C++20-aware, e.g. reshadefx).
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Recursively include the source tree.
|
||||
add_subdirectory(dep)
|
||||
|
||||
# Use C++20 for building the main libraries.
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
add_subdirectory(src)
|
||||
|
||||
if(ANDROID)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories);$(SolutionDir)dep\gsl\include;$(SolutionDir)dep\fast_float\include;$(SolutionDir)dep\fmt\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\minizip\include;$(SolutionDir)dep\stb\include</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
|
|
Loading…
Reference in a new issue