kou commented on code in PR #40399:
URL: https://github.com/apache/arrow/pull/40399#discussion_r1517365967


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -1812,12 +1812,12 @@ if(ARROW_WITH_PROTOBUF)
   else()
     set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1")
   endif()
-  if(ARROW_FLIGHT)
-    set(ARROW_PROTOBUF_ARROW_CMAKE_PACKAGE_NAME "ArrowFlight")
-    set(ARROW_PROTOBUF_ARROW_PC_PACKAGE_NAME "arrow-flight")
-  else()
+  if(ARROW_ORC OR ARROW_WITH_OPENTELEMETRY)
     set(ARROW_PROTOBUF_ARROW_CMAKE_PACKAGE_NAME "Arrow")
     set(ARROW_PROTOBUF_ARROW_PC_PACKAGE_NAME "arrow")
+  elseif(ARROW_FLIGHT)

Review Comment:
   OK. If you don't want to use `else()` here, could you add a new `else()` 
clause with `FATAL_ERROR` to detect unexpected case something like the 
following?
   
   ```cmake
   if(ARROW_ORC OR ARROW_WITH_OPENTELEMETRY)
     # ...
   elseif(ARROW_FLIGHT)
     # ...
   else()
     message(FATAL_ERROR "...")
   endif()
   ```



-- 
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]

Reply via email to