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


##########
cpp/cmake_modules/FindorcAlt.cmake:
##########
@@ -26,7 +26,13 @@ endif()
 if(orcAlt_FIND_QUIETLY)
   list(APPEND find_package_args QUIET)
 endif()
+# orcConfig.cmake overwrites CMAKE_MODULE_PATH and doesn't restore it
+# when one of its dependencies isn't found because find_dependency()
+# calls return() in the config file.
+set(orcAlt_CMAKE_MODULE_PATH_KEEP "${CMAKE_MODULE_PATH}")
 find_package(orc ${find_package_args})
+set(CMAKE_MODULE_PATH "${orcAlt_CMAKE_MODULE_PATH_KEEP}")
+unset(orcAlt_CMAKE_MODULE_PATH_KEEP)

Review Comment:
   How about using `block()` like https://github.com/apache/orc/pull/2735 
instead of restoring `CMAKE_MODULE_PATH` manually?
   
   Could you also add a comment that we need this workaround only for ORC <= 
2.3.1? We'll remove this workaround once we drop support for ORC <= 2.3.1.



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