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)