Commits


Sutou Kouhei authored and GitHub committed e1227a29c29
GH-37352: [C++] Don't put all dependencies to ArrowConfig.cmake/arrow.pc (#37399) ### Rationale for this change Currently, `arrow.pc` has `Requires.private: grpc++` when Flight is enabled and system gRPC is used. `grpc++.pc` depends on `re2.pc` on Amazon Linux 2023 and `re2.pc` has `-std=c++11`. It causes a problem when an user uses `c++ -std=c++17 a.cc $(pkg-config --cflags --libs arrow)`. Because the command will be expanded to `c++ -std=c++17 ... -std=c++11 ...`. The expanded command line uses C++11 not C++17 because `-std=c++11` is appeared after `-std=c++17`. In general, the user must use `c++ ... $(pkg-config --cflags --libs arrow) -std=c++17` to ensure using their `-std=XXX`. But we want to avoid this case as much as possible. ### What changes are included in this PR? Split Flight related dependencies such as gRPC to ArrowFlightConfig.cmake/arrow-flight.pc from ArrowConfig.cmake/arrow.pc. Split Parquet related dependencies such as Thrift to ParquetConfig.cmake/parquet.pc from ArrowConfig.cmake/arrow.pc. With this change, `c++ -std=c++17 ... $(pkg-config --cflags --libs arrow)` works because `arrow.pc` doesn't depend on `grpc++` (`re2`). But `c++ -std=c++17 ... $(pkg-config --cflags --libs arrow-flight)` still doesn't work on Amazon Linux 2023. `c++ ... $(pkg-config --cflags --libs arrow-flight) ... -std=c++17 ...` should be used for the case. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: #37352 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>