This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ba7c2336b [Chore](build) change CMAKE_CXX_STANDARD from 17 to 20 
#19987
3ba7c2336b is described below

commit 3ba7c2336bb8cbdf36026d8931f1534499918965
Author: Pxl <[email protected]>
AuthorDate: Wed May 24 16:16:42 2023 +0800

    [Chore](build) change CMAKE_CXX_STANDARD from 17 to 20 #19987
---
 be/CMakeLists.txt | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 67ad424da5..c03fa7caf1 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -496,7 +496,7 @@ if (NOT CUSTUM_LINKER_COMMAND STREQUAL "ld")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} 
-fuse-ld=${CUSTUM_LINKER_COMMAND}")
 endif()
 
-set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD 20)
 set(CMAKE_C_STANDARD 17)
 
 add_compile_options(-g
@@ -523,12 +523,8 @@ if (COMPILER_GCC)
 endif ()
 
 if (COMPILER_CLANG)
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13")
-        message(FATAL_ERROR "Need Clang version at least 13")
-    endif()
-
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "16")
-        message(WARNING "Doris recommended to use Clang-16 to build backend")
+        message(FATAL_ERROR "Need Clang version at least 16")
     endif()
 
     add_compile_options(-fcolor-diagnostics 
@@ -542,7 +538,6 @@ if (COMPILER_CLANG)
                         -Wno-variadic-macros
                         -Wno-gnu-zero-variadic-macro-arguments
                         -Wno-vla-extension
-                        -Wno-c++20-designator
                         -Wno-embedded-directive)
     if (USE_LIBCPP)
         add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++>)
@@ -550,8 +545,6 @@ if (COMPILER_CLANG)
             add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-lstdc++>)
         endif()
         add_definitions(-DUSE_LIBCPP)
-    else()
-        add_compile_options(-Wno-c++20-attribute-extensions)
     endif()
 endif ()
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to