mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
cmake: Use C++latest everywhere on MSVC.
This commit is contained in:
parent
dbee810a04
commit
89fadd26a6
@ -25,6 +25,14 @@ endif()
|
||||
|
||||
project(dolphin-emu)
|
||||
|
||||
if (MSVC)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std:c++latest")
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
# Name of the Dolphin distributor. If you redistribute Dolphin builds (forks,
|
||||
# unofficial builds) please consider identifying your distribution with a
|
||||
# unique name here.
|
||||
|
2
Externals/FreeSurround/CMakeLists.txt
vendored
2
Externals/FreeSurround/CMakeLists.txt
vendored
@ -1,6 +1,8 @@
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
set(SRCS
|
||||
source/ChannelMaps.cpp
|
||||
|
2
Externals/WIL/tests/cpplatest/CMakeLists.txt
vendored
2
Externals/WIL/tests/cpplatest/CMakeLists.txt
vendored
@ -1,7 +1,9 @@
|
||||
|
||||
# Compilers often don't use the latest C++ standard as the default. Periodically update this value (possibly conditioned
|
||||
# on compiler) as new standards are ratified/support is available
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
project(witest.cpplatest)
|
||||
add_executable(witest.cpplatest)
|
||||
|
3
Externals/cubeb/CMakeLists.txt
vendored
3
Externals/cubeb/CMakeLists.txt
vendored
@ -15,9 +15,12 @@ endif()
|
||||
if(POLICY CMP0063)
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
endif()
|
||||
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
|
||||
if(NOT COMMAND add_sanitizers)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/sanitizers-cmake/cmake")
|
||||
|
2
Externals/discord-rpc/src/CMakeLists.txt
vendored
2
Externals/discord-rpc/src/CMakeLists.txt
vendored
@ -4,7 +4,9 @@ option(ENABLE_IO_THREAD "Start up a separate I/O thread, otherwise I'd need to c
|
||||
option(USE_STATIC_CRT "Use /MT[d] for dynamic library" OFF)
|
||||
option(WARNINGS_AS_ERRORS "When enabled, compiles with `-Werror` (on *nix platforms)." OFF)
|
||||
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
|
||||
set(BASE_RPC_SRC
|
||||
${PROJECT_SOURCE_DIR}/include/discord_rpc.h
|
||||
|
2
Externals/imgui/CMakeLists.txt
vendored
2
Externals/imgui/CMakeLists.txt
vendored
@ -1,6 +1,8 @@
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
set(SRCS
|
||||
imgui.cpp
|
||||
|
@ -18,15 +18,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
add_definitions(-D_SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std:c++latest")
|
||||
else()
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if (MSVC)
|
||||
|
Loading…
Reference in New Issue
Block a user