mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
chore: Upgrade to C++20 in CMake build.
We need at least C++14 for `std::make_unique`, and would like to use C++20 for designated initialisers to construct Network/Random vtables.
This commit is contained in:
parent
f68b1412b4
commit
e3fd8922a4
|
@ -82,12 +82,12 @@ set(CMAKE_MACOSX_RPATH ON)
|
||||||
if(${CMAKE_VERSION} VERSION_LESS "3.1.0")
|
if(${CMAKE_VERSION} VERSION_LESS "3.1.0")
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# Set standard version for compiler.
|
# Set standard version for compiler.
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_C_EXTENSIONS OFF)
|
set(CMAKE_C_EXTENSIONS OFF)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user