zhjwpku commented on code in PR #6: URL: https://github.com/apache/iceberg-cpp/pull/6#discussion_r1874599187
########## src/arrow/CMakeLists.txt: ########## @@ -0,0 +1,66 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +if(NOT ICEBERG_ARROW) Review Comment: Why do we need a directory called arrow, ISTM we do need some helper functions to wrapper the usage of arrow, but put it directly under src make people think arrow is part of iceberg's spec. I'd suggest we create a directory called util and put arrow wrapper under that, what do you think? ########## src/arrow/IcebergArrowConfig.cmake.in: ########## @@ -0,0 +1,54 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This config sets the following variables in your project:: +# +# IcebergArrow_FOUND - true if IcebergArrow found on the system +# ICEBERG_ARROW_VERSION - version of the found IcebergArrow +# +# This config sets the following targets in your project:: +# +# IcebergArrow::iceberg_arrow_shared - for linked as shared library if shared library is built +# IcebergArrow::iceberg_arrow_static - for linked as static library if static library is built + +@PACKAGE_INIT@ + +set(ICEBERG_ARROW_VENDOR_DEPENDENCIES "@ICEBERG_ARROW_VENDOR_DEPENDENCIES@") +set(ICEBERG_ARROW_SYSTEM_DEPENDENCIES "@ICEBERG_ARROW_SYSTEM_DEPENDENCIES@") + +include(CMakeFindDependencyMacro) +find_dependency(IcebergCore) + +if (ICEBERG_BUILD_STATIC) + iceberg_find_dependencies("${ICEBERG_ARROW_SYSTEM_DEPENDENCIES}") +endif() + +foreach(dependency ${ICEBERG_ARROW_VENDOR_DEPENDENCIES}) + string(REPLACE "|" ";" dependency_pair ${dependency}) + list(LENGTH dependency_pair dependency_pair_length) + if(NOT dependency_pair_length EQUAL 2) + message(FATAL_ERROR "Invalid vendor dependency: ${dependency}") + endif() + list(GET dependency_pair 0 target_name) + list(GET dependency_pair 1 static_lib_name) + + add_library("${target_name}" STATIC IMPORTED) +endforeach() + +include("${CMAKE_CURRENT_LIST_DIR}/IcebergArrowTargets.cmake") +check_required_components(IcebergArrow) +iceberg_show_details(IcebergArrow ICEBERG_ARROW) Review Comment: It's always good to include a empty line at the end of a file. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org