diff options
| author | Egor Tensin <egor@tensin.name> | 2026-05-19 18:40:42 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-05-19 18:40:47 +0200 |
| commit | 2c071e2e048dd4c6920a08d47d91ab3dae655082 (patch) | |
| tree | a8d817570893d24e2f1726c17bd86179f6d59c8a | |
| parent | cmake: upgrade minimum version (diff) | |
| download | math-server-2c071e2e048dd4c6920a08d47d91ab3dae655082.tar.gz math-server-2c071e2e048dd4c6920a08d47d91ab3dae655082.zip | |
cmake: set the required C++ standard
Not sure if it was the removal of common.cmake or the CMake version
upgrade, but VS 2022 builds on CI started failing with standard mismatch
errors.
| -rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a7a7e02..d75fbfb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,11 @@ cmake_minimum_required(VERSION 3.25) project(math_server CXX) enable_testing() +# Required at least for <variant>, etc. +# Plus, quite frankly, I think it is mature enough. +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + # AppVeyor builds w/ Visual Studio 2017 bombard me with stupid warnings otherwise: if(MSVC_VERSION GREATER_EQUAL "1910" AND MSVC_VERSION LESS "1920") add_definitions(/D_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING) |
