wgtmac commented on code in PR #2416:
URL: https://github.com/apache/orc/pull/2416#discussion_r2387332492
##########
cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -170,41 +303,68 @@ elseif (ORC_PACKAGE_KIND STREQUAL "vcpkg")
list (APPEND ORC_SYSTEM_DEPENDENCIES Snappy)
list (APPEND ORC_INSTALL_INTERFACE_TARGETS
"$<INSTALL_INTERFACE:Snappy::snappy>")
elseif (NOT "${SNAPPY_HOME}" STREQUAL "")
- find_package (Snappy REQUIRED)
+ find_package (SnappyAlt REQUIRED)
if (ORC_PREFER_STATIC_SNAPPY AND SNAPPY_STATIC_LIB)
orc_add_resolved_library (orc_snappy ${SNAPPY_STATIC_LIB}
${SNAPPY_INCLUDE_DIR})
else ()
orc_add_resolved_library (orc_snappy ${SNAPPY_LIBRARY}
${SNAPPY_INCLUDE_DIR})
endif ()
- list (APPEND ORC_SYSTEM_DEPENDENCIES Snappy)
+ list (APPEND ORC_SYSTEM_DEPENDENCIES SnappyAlt)
list (APPEND ORC_INSTALL_INTERFACE_TARGETS
"$<INSTALL_INTERFACE:Snappy::snappy>")
- orc_provide_find_module (Snappy)
+ orc_provide_find_module (SnappyAlt)
else ()
Review Comment:
Doesn't it break arrow-cpp (where `SNAPPY_LIBRARY ` and `SNAPPY_INCLUDE_DIR`
are explicitly provided)?
Update: I've tried to apply this change with or without `CONFIG` in the
FIND_PACKAGE_ARGS. In both cases, system snappy is used instead of arrow
vendored one.
```
-- Apache ORC: PROTOBUF_HOME: /opt/homebrew
-- Apache ORC: Found the Protobuf headers: /opt/homebrew/include
-- Apache ORC: Found the Protobuf library: protobuf::libprotobuf
-- Apache ORC: Found the Protoc library: protobuf::libprotoc
-- Apache ORC: Found the Protoc executable: protobuf::protoc
-- Apache ORC: Providing CMake module for FindProtobufAlt as part of CMake
package
-- Apache ORC: Using system snappy <-------
-- Apache ORC: ZLIB_HOME:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr
-- Apache ORC: Found the ZLIB header:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/zlib.h
-- Apache ORC: Found the ZLIB library: ZLIB::ZLIB
-- Apache ORC: Providing CMake module for FindZLIBAlt as part of CMake
package
```
--
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]