Skip to content

Commit

Permalink
ARROW-1615 Identify compiler version for clang-802 plus more warning …
Browse files Browse the repository at this point in the history
…entries
  • Loading branch information
renesugar committed Sep 29, 2017
1 parent 5ebaf86 commit 9d3c7ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cpp/cmake_modules/CompilerInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ elseif("${COMPILER_VERSION_FULL}" MATCHES ".*clang-7")
set(COMPILER_FAMILY "clang")
set(COMPILER_VERSION "3.7.0svn")

# clang on Mac OS X, XCode 8.
elseif("${COMPILER_VERSION_FULL}" MATCHES ".*clang-802")
set(COMPILER_FAMILY "clang")
set(COMPILER_VERSION "3.9.0svn")

# clang on Mac OS X, XCode 8.
elseif("${COMPILER_VERSION_FULL}" MATCHES ".*clang-8")
set(COMPILER_FAMILY "clang")
Expand Down
10 changes: 8 additions & 2 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@ if ("${UPPERCASE_BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN")
-Wno-implicit-fallthrough -Wno-old-style-cast -Wno-unreachable-code-return \
-Wno-float-equal -Wno-missing-prototypes -Wno-non-virtual-dtor \
-Wno-unused-macros -Wno-covered-switch-default -Wno-unreachable-code-break \
-Wno-extra-semi -Wno-shift-sign-overflow \
-Wno-extra-semi -Wno-shorten-64-to-32 -Wno-shift-sign-overflow \
-Wno-used-but-marked-unused -Wno-missing-variable-declarations \
-Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-sign-conversion \
-Wno-disabled-macro-expansion -Wc++11-narrowing -Wnarrowing")

# Version numbers where warnings are introduced
if ("${COMPILER_VERSION}" VERSION_GREATER "3.3")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-gnu-folding-constant")
endif()
if ("${COMPILER_VERSION}" VERSION_GREATER "3.6")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-reserved-id-macro")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-range-loop-analysis")
Expand Down Expand Up @@ -140,12 +143,15 @@ else()
-Wno-implicit-fallthrough -Wno-old-style-cast -Wno-unreachable-code-return \
-Wno-float-equal -Wno-missing-prototypes -Wno-non-virtual-dtor \
-Wno-unused-macros -Wno-covered-switch-default -Wno-unreachable-code-break \
-Wno-extra-semi -Wno-shift-sign-overflow \
-Wno-extra-semi -Wno-shorten-64-to-32 -Wno-shift-sign-overflow \
-Wno-used-but-marked-unused -Wno-missing-variable-declarations \
-Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-sign-conversion \
-Wno-disabled-macro-expansion -Wc++11-narrowing -Wnarrowing")

# Version numbers where warnings are introduced
if ("${COMPILER_VERSION}" VERSION_GREATER "3.3")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-gnu-folding-constant")
endif()
if ("${COMPILER_VERSION}" VERSION_GREATER "3.6")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-reserved-id-macro")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-range-loop-analysis")
Expand Down

0 comments on commit 9d3c7ec

Please sign in to comment.