From 672aa014d8e36ae3332621f1d8456a0f8f4a1d8d Mon Sep 17 00:00:00 2001 From: Koen Bussemaker Date: Mon, 15 Apr 2024 22:23:55 +0200 Subject: [PATCH] Doc: Updated Visual Studio, cpp standard and Cmake version --- COMPILING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/COMPILING.md b/COMPILING.md index dfdcd4ead5..74e816253e 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -29,7 +29,7 @@ open most older savegames or use the content downloading system. ## Windows -You need Microsoft Visual Studio 2017 or more recent. +You need Microsoft Visual Studio 2022 or more recent. You can download the free Visual Studio Community Edition from Microsoft at https://visualstudio.microsoft.com/vs/community/. @@ -65,7 +65,7 @@ To install both the x64 (64bit) and x86 (32bit) variants (though only one is nec You can open the folder (as a CMake project). CMake will be detected, and you can compile from there. If libraries are installed but not found, you need to set VCPKG_TARGET_TRIPLET in CMake parameters. -For Visual Studio 2017 you also need to set CMAKE_TOOLCHAIN_FILE. +For Visual Studio 2022 you also need to set CMAKE_TOOLCHAIN_FILE. (Typical values are shown in the MSVC project file command line example) Alternatively, you can create a MSVC project file via CMake. For this @@ -75,7 +75,7 @@ that comes with vcpkg. After that, you can run something similar to this: ```powershell mkdir build cd build -cmake.exe .. -G"Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static" +cmake.exe .. -G"Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static" ``` Change `` to where you have installed vcpkg. After this @@ -83,7 +83,7 @@ in the build folder are MSVC project files. MSVC can rebuild the project files himself via the `ZERO_CHECK` project. ## All other platforms -Minimum required version of CMake is 3.9. +Minimum required version of CMake is 3.16. By default this produces a Debug build with assertations enabled. This is a far slower build than release builds. @@ -115,9 +115,9 @@ builds. ## Supported compilers -Every compiler that is supported by CMake and supports C++17, should be +Every compiler that is supported by CMake and supports C++20, 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++17, and to CMake +we refer to the compiler manual to see if it supports C++20, and to CMake to see if it supports your compiler. ## Compilation of base sets