From 07632ad825086a3910ed1690dad30c602d67c213 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 12 Jul 2020 18:15:27 -0400 Subject: [PATCH] CMakeLists: Enable usage of C++20 on Linux This also fixes building on Linux with C++20, so we can enable it across the board for all OSes that we officially support. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99476c55f..a5357335f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,15 +118,15 @@ message(STATUS "Target architecture: ${ARCHITECTURE}") # Configure C++ standard # =========================== +# boost asio's concept usage doesn't play nicely with some compilers yet. +add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) if (MSVC) add_compile_options(/std:c++latest) # cubeb and boost still make use of deprecated result_of. add_definitions(-D_HAS_DEPRECATED_RESULT_OF) - # boost asio's concept usage doesn't play nicely with MSVC yet. - add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) else() - set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif()