Skip to content

Commit 654937b

Browse files
committed
The fix
1 parent 16cd49b commit 654937b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,6 +2867,15 @@ function(build_re2)
28672867

28682868
fetchcontent_makeavailable(re2)
28692869

2870+
# Suppress -Wnested-anon-types warnings from RE2's use of anonymous types
2871+
# in anonymous unions (a compiler extension).
2872+
# See: https://github.com/apache/arrow/issues/48973
2873+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
2874+
if(TARGET re2)
2875+
target_compile_options(re2 PRIVATE -Wno-nested-anon-types)
2876+
endif()
2877+
endif()
2878+
28702879
if(CMAKE_VERSION VERSION_LESS 3.28)
28712880
set_property(DIRECTORY ${re2_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL TRUE)
28722881
endif()

0 commit comments

Comments
 (0)