From 2b83364a7e56d3603076f9b05044b08c4801cabf Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Fri, 5 Feb 2021 14:54:09 +0200 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fefe5f3..f5cf269d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,8 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "(GNU)+") # Specific flags set(CPP_STD_COMPILER_FLAG "-std=c++14") # Don't even bother with previous version - if(CPP_STD_NUMBER LESS 20 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) + # While GCC 8 supports some C++20. Some platforms have issues with and std::byte + if(CPP_STD_NUMBER LESS 20 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) check_cxx_compiler_flag(-std=c++20 HAVE_FLAG_STD_CXX20) check_cxx_compiler_flag(-std=c++2a HAVE_FLAG_STD_CXX2A) if(HAVE_FLAG_STD_CXX20 OR HAVE_FLAG_STD_CXX2A)