Path: blob/main/build_config/debian/patches/10_cmake_cxx_version.patch
169678 views
diff --git a/CMakeLists.txt b/CMakeLists.txt1index 42d6876ef57..dd2dd48f612 1006442--- a/CMakeLists.txt3+++ b/CMakeLists.txt4@@ -93,7 +93,11 @@ endif ()5# C++17 is needed by std::filesystem and parquet.6# C++14 is needed by Google Test >= 1.13, for all the other parts C++11 should be enough.7# This will silently fall back to C++14 or even C++11, whatever is supported by the compiler.8-set(CMAKE_CXX_STANDARD 17)9+if (${CMAKE_VERSION} VERSION_LESS 3.8.0)10+ set(CMAKE_CXX_STANDARD 14)11+else()12+ set(CMAKE_CXX_STANDARD 17)13+endif()14if (NOT "cxx_std_17" IN_LIST CMAKE_CXX_COMPILE_FEATURES)15message(WARNING "Your compiler does not support C++17. Please consider upgrading your compiler toolchain.")16endif()171819