This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new d5e9e13293 GH-40751: [C++] Fix protobuf package name setting for
builds with substrait (#40753)
d5e9e13293 is described below
commit d5e9e1329385497223fa0e213c65c2a4aba45466
Author: Rossi Sun <[email protected]>
AuthorDate: Mon Mar 25 04:57:14 2024 +0800
GH-40751: [C++] Fix protobuf package name setting for builds with substrait
(#40753)
### Rationale for this change
The problem #40751 seems to be introduced by #40399. Though I'm not
entirely sure about the purpose of that, it seems to be missing an `OR
ARROW_SUBSTRAIT` in the `if` branch in
https://github.com/apache/arrow/commit/5baca0f16e924c42741729f041b31a02883548b9#diff-5cdc95f4e1b618f2f3ef10d370ce05a1ac05d9d401aecff3ccbb3d76bd366b6aR1815
Because other than `ARROW_ORC`, `ARROW_WITH_OPENTELEMETRY` and
`ARROW_FLIGHT`, `ARROW_SUBSTRAIT` also implies `ARROW_WITH_PROTOBUF`:
https://github.com/apache/arrow/blob/5baca0f16e924c42741729f041b31a02883548b9/cpp/cmake_modules/ThirdpartyToolchain.cmake#L421-L423
### What changes are included in this PR?
Add the possible missing condition of `ARROW_SUBSTRAIT` for the questioning
`if` branch.
### Are these changes tested?
Manually tested.
### Are there any user-facing changes?
None.
* GitHub Issue: #40751
Lead-authored-by: Ruoxi Sun <[email protected]>
Co-authored-by: Rossi Sun <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index b8e765f085..ad7344b09d 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1812,7 +1812,9 @@ if(ARROW_WITH_PROTOBUF)
else()
set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1")
endif()
- if(ARROW_ORC OR ARROW_WITH_OPENTELEMETRY)
+ if(ARROW_ORC
+ OR ARROW_SUBSTRAIT
+ OR ARROW_WITH_OPENTELEMETRY)
set(ARROW_PROTOBUF_ARROW_CMAKE_PACKAGE_NAME "Arrow")
set(ARROW_PROTOBUF_ARROW_PC_PACKAGE_NAME "arrow")
elseif(ARROW_FLIGHT)