You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2022/01/18 01:39:00 UTC

[orc] branch main updated: ORC-1090: Disable Clang 13.0-specific compilation warnings (#1017)

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

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new bdafd05  ORC-1090: Disable Clang 13.0-specific compilation warnings (#1017)
bdafd05 is described below

commit bdafd054750b6c1cc9117524cfe48b928ec8df4f
Author: zhanglistar <zh...@gmail.com>
AuthorDate: Tue Jan 18 09:37:26 2022 +0800

    ORC-1090: Disable Clang 13.0-specific compilation warnings (#1017)
    
    ### What changes were proposed in this pull request?
    
    Disable Clang 13.0-specific compilation warnings.
    
    ### Why are the changes needed?
    
    Just some syntax changes.
    
    ### How was this patch tested?
    
    Tested in docker ubuntu 21.10, compile succeses.
    cmake log:
    [cmake.log](https://github.com/apache/orc/files/7879628/cmake.log)
    
    make log:
    [make.log](https://github.com/apache/orc/files/7879629/make.log)
    
    ```
    env:
    root@11fd9871d089:/code/neworc/build# cat /etc/os-release
    PRETTY_NAME="Ubuntu 21.10"
    NAME="Ubuntu"
    VERSION_ID="21.10"
    VERSION="21.10 (Impish Indri)"
    VERSION_CODENAME=impish
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=impish
    
    root@11fd9871d089:/code/neworc/build# clang-13 --version
    Ubuntu clang version 13.0.0-2
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
    ```
---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3e5d49..b54fbd1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,7 +55,7 @@ option(INSTALL_VENDORED_LIBS
 option(STOP_BUILD_ON_WARNING
     "Fail the build on C++ warnings"
     ON)
-  
+
 option(BUILD_POSITION_INDEPENDENT_LIB
     "Compile static libraries with position independent code"
     OFF)
@@ -97,6 +97,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
   set (WARN_FLAGS "${WARN_FLAGS} -Wno-missing-noreturn -Wno-unknown-pragmas")
   set (WARN_FLAGS "${WARN_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
   set (WARN_FLAGS "${WARN_FLAGS} -Wconversion")
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "13.0")
+    set (WARN_FLAGS "${WARN_FLAGS} -Wno-reserved-identifier -Wno-suggest-destructor-override -Wno-suggest-override")
+  endif()
   if (CMAKE_HOST_APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "12.0")
     set (WARN_FLAGS "${WARN_FLAGS} -Wno-c++2a-compat -Wno-unknown-warning-option -Wno-suggest-override -Wno-suggest-destructor-override")
   elseif (CMAKE_HOST_APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "11.0")