diff --git a/CMakeLists.txt b/CMakeLists.txt index 0931d424c..85a744c7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,12 +34,16 @@ endif() # Set up C++ Standard # ``-DCMAKE_CXX_STANDARD=`` when invoking CMake -set(CMAKE_CXX_STANDARD 17 CACHE STRING "") +set(CMAKE_CXX_STANDARD 20 CACHE STRING "") if(NOT CMAKE_CXX_STANDARD MATCHES "17|20") message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}") endif() +if(CMAKE_CXX_STANDARD EQUAL 17) + message(WARNING "C++17 is deprecated and support for it will be removed in v01-03. Please use at least C++20.") +endif() + # Prevent CMake falls back to the latest standard the compiler does support set(CMAKE_CXX_STANDARD_REQUIRED ON)