File tree Expand file tree Collapse file tree 3 files changed +10
-26
lines changed
Expand file tree Collapse file tree 3 files changed +10
-26
lines changed Original file line number Diff line number Diff line change @@ -3271,6 +3271,16 @@ function(build_grpc)
32713271 add_executable (gRPC::grpc_cpp_plugin ALIAS grpc_cpp_plugin)
32723272 endif ()
32733273
3274+ # gRPC headers use deprecated std::iterator that causes compilation errors.
3275+ # This workaround can be removed once we upgrade to a newer gRPC version.
3276+ if (NOT MSVC )
3277+ foreach (target ${GRPC_LIBRARY_TARGETS} )
3278+ if (TARGET ${target} )
3279+ target_compile_options (${target} INTERFACE -Wno-error=deprecated-declarations)
3280+ endif ()
3281+ endforeach ()
3282+ endif ()
3283+
32743284 # Add gRPC libraries to bundled static libs.
32753285 list (APPEND
32763286 ARROW_BUNDLED_STATIC_LIBS
Original file line number Diff line number Diff line change @@ -127,15 +127,6 @@ if(ARROW_FLIGHT)
127127 "${CMAKE_CURRENT_BINARY_DIR} /helloworld.pb.cc"
128128 "${CMAKE_CURRENT_BINARY_DIR} /helloworld.grpc.pb.cc" )
129129
130- # gRPC headers use deprecated std::iterator (deprecated in C++17, removed in C++20).
131- # This causes compilation errors with GCC 15+ when using -Werror.
132- # This workaround can be removed once we upgrade to a newer gRPC version that doesn't
133- # use std::iterator (likely gRPC 1.60+).
134- # TODO: Can't we pass this to add_arrow_example() to apply it to the target directly?
135- if (NOT MSVC )
136- target_compile_options (flight-grpc-example PRIVATE -Wno-error=deprecated-declarations)
137- endif ()
138-
139130 if (ARROW_FLIGHT_SQL)
140131 if (ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED)
141132 set (FLIGHT_SQL_EXAMPLES_LINK_LIBS arrow_flight_sql_shared)
@@ -152,13 +143,6 @@ if(ARROW_FLIGHT)
152143 gRPC::grpc++
153144 ${ARROW_PROTOBUF_LIBPROTOBUF}
154145 ${GFLAGS_LIBRARIES} )
155-
156- # gRPC headers use deprecated std::iterator
157- # TODO: Can't we pass this to add_arrow_example() to apply it to the target directly?
158- if (NOT MSVC )
159- target_compile_options (flight-sql-example
160- PRIVATE -Wno-error=deprecated-declarations)
161- endif ()
162146 endif ()
163147endif ()
164148
Original file line number Diff line number Diff line change 1717
1818add_custom_target (arrow_flight)
1919
20- # gRPC headers use deprecated std::iterator (deprecated in C++17, removed in C++20).
21- # This causes compilation errors with GCC 15+ when using -Werror.
22- # This workaround can be removed once we upgrade to a newer gRPC version that doesn't
23- # use std::iterator (likely gRPC 1.60+).
24- # Apply to all Flight targets (libraries, tests, executables) in this directory.
25- # TODO: Check whether this is global and try a better approach if so.
26- if (NOT MSVC )
27- add_compile_options (-Wno-error=deprecated-declarations)
28- endif ()
29-
3020arrow_install_all_headers("arrow/flight" )
3121
3222# If libarrow_flight.a is only built, "pkg-config --cflags --libs
You can’t perform that action at this time.
0 commit comments