From 5d278b62ccdacbf16b482c1d10247def85ceb71c Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 13 Dec 2020 22:24:36 +0100 Subject: [PATCH] Codechange: switch to C++17 on all platforms. --- CMakeLists.txt | 9 +-------- COMPILING.md | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a0dd5b759..15c6e03c0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,14 +32,7 @@ set_directory_options() include(Static) set_static_if_needed() -if(MSVC) - # C++17 for MSVC - set(CMAKE_CXX_STANDARD 17) -else() - # C++11 for all other targets - set(CMAKE_CXX_STANDARD 11) -endif() - +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED YES) set(CMAKE_CXX_EXTENSIONS NO) diff --git a/COMPILING.md b/COMPILING.md index 64f25f9c22..759dd2e9c4 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -83,9 +83,9 @@ make ## Supported compilers -Every compiler that is supported by CMake and supports C++11, should be +Every compiler that is supported by CMake and supports C++17, should be able to compile OpenTTD. As the exact list of compilers changes constantly, -we refer to the compiler manual to see if it supports C++11, and to CMake +we refer to the compiler manual to see if it supports C++17, and to CMake to see if it supports your compiler. ## Compilation of base sets