wgtmac commented on code in PR #233:
URL: https://github.com/apache/iceberg-cpp/pull/233#discussion_r2418810095
##########
src/iceberg/CMakeLists.txt:
##########
@@ -94,17 +94,24 @@ add_iceberg_lib(iceberg
STATIC_INSTALL_INTERFACE_LIBS
${ICEBERG_STATIC_INSTALL_INTERFACE_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
- ${ICEBERG_SHARED_INSTALL_INTERFACE_LIBS})
+ ${ICEBERG_SHARED_INSTALL_INTERFACE_LIBS}
+ OUTPUTS
+ ICEBERG_LIBRARIES)
+
+foreach(LIB_TARGET ${ICEBERG_LIBRARIES})
Review Comment:
Any finding?
##########
cmake_modules/IcebergBuildUtils.cmake:
##########
@@ -208,6 +211,8 @@ function(add_iceberg_lib LIB_NAME)
target_link_libraries(${LIB_NAME}_static
PUBLIC "$<BUILD_INTERFACE:iceberg_sanitizer_flags>")
+ string(TOUPPER ${LIB_NAME} VISIBILITY_NAME)
+ target_compile_definitions(${LIB_NAME}_static PUBLIC
${VISIBILITY_NAME}_STATIC)
Review Comment:
```suggestion
target_compile_definitions(${LIB_NAME}_static PUBLIC
${VISIBILITY_NAME}_STATIC)
```
##########
src/iceberg/CMakeLists.txt:
##########
@@ -171,17 +178,16 @@ if(ICEBERG_BUILD_BUNDLE)
STATIC_INSTALL_INTERFACE_LIBS
${ICEBERG_BUNDLE_STATIC_INSTALL_INTERFACE_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
- ${ICEBERG_BUNDLE_SHARED_INSTALL_INTERFACE_LIBS})
+ ${ICEBERG_BUNDLE_SHARED_INSTALL_INTERFACE_LIBS}
+ OUTPUTS
+ ICEBERG_BUNDLE_LIBRARIES)
Review Comment:
We need same logic to add `_EXPORTING` and `_STATIC` to `iceberg_bundle`.
##########
src/iceberg/meson.build:
##########
@@ -0,0 +1,139 @@
+# 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.
+
+iceberg_include_dir = include_directories('..')
+iceberg_sources = files(
+ 'arrow_c_data_guard_internal.cc',
+ 'catalog/in_memory_catalog.cc',
+ 'expression/expression.cc',
+ 'expression/literal.cc',
+ 'file_reader.cc',
+ 'file_writer.cc',
+ 'inheritable_metadata.cc',
+ 'json_internal.cc',
+ 'manifest_entry.cc',
+ 'manifest_list.cc',
+ 'manifest_reader.cc',
+ 'manifest_reader_internal.cc',
+ 'manifest_writer.cc',
+ 'metadata_columns.cc',
+ 'name_mapping.cc',
+ 'partition_field.cc',
+ 'partition_spec.cc',
+ 'schema.cc',
+ 'schema_field.cc',
+ 'schema_internal.cc',
+ 'schema_util.cc',
+ 'snapshot.cc',
+ 'sort_field.cc',
+ 'sort_order.cc',
+ 'statistics_file.cc',
+ 'table.cc',
+ 'table_metadata.cc',
+ 'table_scan.cc',
+ 'transform.cc',
+ 'transform_function.cc',
+ 'type.cc',
+ 'util/decimal.cc',
+ 'util/gzip_internal.cc',
+ 'util/murmurhash3_internal.cc',
+ 'util/timepoint.cc',
+)
+
+nanoarrow_dep = dependency('nanoarrow')
+nlohmann_json_dep = dependency('nlohmann_json')
+spdlog_dep = dependency('spdlog')
+zlib_dep = dependency('zlib')
+
+iceberg_deps = [nanoarrow_dep, nlohmann_json_dep, spdlog_dep, zlib_dep]
+
+iceberg_lib = library(
Review Comment:
Create an issue and add a comment to follow up with this?
##########
meson.build:
##########
@@ -0,0 +1,38 @@
+# 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.
+
+project(
+ 'iceberg',
+ 'cpp',
+ version: '0.2.0',
+ license: 'Apache-2.0',
+ meson_version: '>=1.3.0',
+ default_options: [
+ 'cpp_std=c++23,c++latest',
+ 'warning_level=2',
+ # Don't build any tests for curl
+ 'curl:tests=disabled',
+ 'curl:unittests=disabled',
+ ],
+)
+
+subdir('src')
+
+install_data(
+ ['LICENSE', 'NOTICE'],
+ install_dir: get_option('datadir') / 'doc/Iceberg',
Review Comment:
I agree. Let's fix it in this PR?
##########
src/iceberg/icebergConfig.cmake.in:
##########
@@ -85,17 +85,17 @@ if(NOT TARGET CURL::libcurl)
add_library(CURL::libcurl INTERFACE IMPORTED)
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/IcebergTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/icebergTargets.cmake")
Review Comment:
What about renaming it to `iceberg-targets.cmake` and rename the current
file to `iceberg-config.cmake.in` to be consistent?
##########
meson.options:
##########
@@ -0,0 +1,18 @@
+# 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.
+
+option('tests', type: 'feature', description: 'Build tests', value: 'enabled')
Review Comment:
Perhaps adding these as comments to this file so impatient developers do not
need to do research by themselves?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]