kou commented on code in PR #43706:
URL: https://github.com/apache/arrow/pull/43706#discussion_r1719156798
##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -1355,12 +1355,22 @@ macro(build_snappy)
"-DCMAKE_INSTALL_PREFIX=${SNAPPY_PREFIX}")
# Snappy unconditionally enables -Werror when building with clang this can
lead
# to build failures by way of new compiler warnings. This adds a flag to
disable
- # Werror to the very end of the invocation to override the snappy internal
setting.
+ # -Werror to the very end of the invocation to override the snappy internal
setting.
+ set(SNAPPY_ADDITIONAL_CXX_FLAGS "")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ string(APPEND SNAPPY_ADDITIONAL_CXX_FLAGS " -Wno-error")
+ endif()
+ # Snappy unconditionally disables RTTI, which is incompatible with some other
+ # build settings (https://github.com/apache/arrow/issues/43688).
+ if(NOT MSVC)
+ string(APPEND SNAPPY_ADDITIONAL_CXX_FLAGS " -frtti")
+ endif()
+
+ if(NOT MSVC)
foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
list(APPEND
SNAPPY_CMAKE_ARGS
-
"-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS_${CONFIG}} -Wno-error"
+
"-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS_${CONFIG}}
${SNAPPY_ADDITIONAL_CXX_FLAGS}"
Review Comment:
```suggestion
"-DCMAKE_CXX_FLAGS_${CONFIG}=${EP_CXX_FLAGS_${CONFIG}}
${SNAPPY_ADDITIONAL_CXX_FLAGS}"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]