wgtmac opened a new pull request, #2735: URL: https://github.com/apache/orc/pull/2735
### What changes were proposed in this pull request? - Isolate dependency discovery in `orcConfig.cmake` with a CMake variable scope, propagating `orc_FOUND` and `orc_NOT_FOUND_MESSAGE` while keeping `CMAKE_MODULE_PATH` local even on an early return. - Add six configure-only CTest cases covering successful/missing dependency discovery with `CMAKE_MODULE_PATH` initially undefined, empty, or containing multiple directories. The tests also check imported targets, compatibility variables, failure diagnostics, and subsequent caller module discovery. ### Why are the changes needed? [ORC-2235](https://issues.apache.org/jira/browse/ORC-2235) `find_dependency()` returns from the package config when a dependency cannot be found. The previous manual restoration of `CMAKE_MODULE_PATH` was therefore skipped, leaking ORC's module search path into the consuming project. This caused a misleading AWS dependency-discovery failure in Arrow after ORC's LZ4 dependency lookup failed. apache/arrow#55415 adds a caller-side workaround; this PR fixes the underlying ORC configuration leak. It does not change LZ4 dependency-selection policy. ### How was this patch tested? On macOS with CMake 4.3.1: ```sh cmake -S . -B build -DBUILD_JAVA=OFF cmake --build build --target orc-test --parallel 8 cmake --build build --target test-out ``` All 8 CTest tests passed, including `orc-test`, `tool-test`, and the six new configure-only regression cases. Also ran all six regression cases with CMake 3.25.2; all passed. Verified that all three missing-dependency cases fail against the original config template. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (desktop app 26.1029.61003) -- 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]
