kou commented on a change in pull request #10913:
URL: https://github.com/apache/arrow/pull/10913#discussion_r691722004
##########
File path: .github/workflows/cpp.yml
##########
@@ -60,11 +60,17 @@ jobs:
image:
- conda-cpp
- ubuntu-cpp-sanitizer
+ - ubuntu-cpp-skyhook
include:
- image: conda-cpp
title: AMD64 Conda C++
- image: ubuntu-cpp-sanitizer
title: AMD64 Ubuntu 20.04 C++ ASAN UBSAN
+ - image: |
+ -e CPP_MAKE_PARALLELISM=2 \
Review comment:
Is this needed?
##########
File path: cpp/cmake_modules/Findlibrados.cmake
##########
@@ -0,0 +1,31 @@
+# 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.
+
+find_path(LIBRADOS_INCLUDE_DIR rados/librados.hpp)
Review comment:
Could you use `librados_` not `LIBRADOS` for prefix?
Because `Findlibrados.cmake` means that `librados` is the package name.
##########
File path: cpp/src/skyhook/CMakeLists.txt
##########
@@ -0,0 +1,108 @@
+# 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 limitationsn
+# under the License.
+
+#
+# arrow_skyhook
+#
+# define project properties
+project(arrow_skyhook)
+cmake_minimum_required(VERSION 3.11)
+set(ARROW_BUILD_STATIC OFF)
+
+# install skyhook headers
+install(FILES client/file_skyhook.h
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/skyhook/client")
Review comment:
Can we use `arrow_install_all_headers()` instead of this?
##########
File path: cpp/cmake_modules/Findlibrados.cmake
##########
@@ -0,0 +1,31 @@
+# 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.
+
+find_path(LIBRADOS_INCLUDE_DIR rados/librados.hpp)
+
+find_library(LIBRADOS_LIBRARY NAMES rados)
+
+mark_as_advanced(LIBRADOS_LIBRARY LIBRADOS_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(librados DEFAULT_MSG LIBRADOS_LIBRARY
+ LIBRADOS_INCLUDE_DIR)
+
+if(LIBRADOS_FOUND)
+ set(LIBRADOS_INCLUDE_DIRS ${LIBRADOS_INCLUDE_DIR})
+ set(LIBRADOS_LIBRARIES ${LIBRADOS_LIBRARY})
Review comment:
Could you create an import library that has these information?
```cmake
add_library(librados::rados UNKNOWN IMPORTED)
set_target_property(librados::rados ...)
```
See also other `Find*.cmake` in `cpp/cmake_modules/`.
##########
File path: cpp/src/skyhook/CMakeLists.txt
##########
@@ -0,0 +1,108 @@
+# 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 limitationsn
+# under the License.
+
+#
+# arrow_skyhook
+#
+# define project properties
+project(arrow_skyhook)
+cmake_minimum_required(VERSION 3.11)
+set(ARROW_BUILD_STATIC OFF)
+
+# install skyhook headers
+install(FILES client/file_skyhook.h
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/skyhook/client")
+
+# define the targets to build
+add_custom_target(arrow_skyhook_client)
+add_custom_target(cls_skyhook)
+
+# define the dependencies
+find_package(librados REQUIRED)
+include_directories(${LIBRADOS_INCLUDE_DIR})
+set(ARROW_DATASET_LINK_STATIC arrow_dataset_static)
+set(ARROW_DATASET_LINK_SHARED arrow_dataset_shared)
+set(ARROW_DATASET_LINK_STATIC ${ARROW_DATASET_LINK_STATIC}
${LIBRADOS_LIBRARIES})
+set(ARROW_DATASET_LINK_SHARED ${ARROW_DATASET_LINK_SHARED}
${LIBRADOS_LIBRARIES})
+
+# define the client and cls sources
+set(ARROW_SKYHOOK_CLIENT_SOURCES client/file_skyhook.cc
protocol/rados_protocol.cc
+ protocol/skyhook_protocol.cc)
+set(ARROW_SKYHOOK_CLS_SOURCES cls/cls_skyhook.cc protocol/rados_protocol.cc
+ protocol/skyhook_protocol.cc)
+
+# define the client library
+add_arrow_lib(arrow_skyhook_client
+ BUILD_SHARED
+ ON
Review comment:
Why do we need this?
##########
File path: cpp/src/skyhook/CMakeLists.txt
##########
@@ -0,0 +1,108 @@
+# 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 limitationsn
+# under the License.
+
+#
+# arrow_skyhook
+#
+# define project properties
+project(arrow_skyhook)
+cmake_minimum_required(VERSION 3.11)
Review comment:
We don't need them because we call them in `cpp/CMakeLists.txt`.
##########
File path: cpp/src/skyhook/CMakeLists.txt
##########
@@ -0,0 +1,108 @@
+# 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 limitationsn
+# under the License.
+
+#
+# arrow_skyhook
+#
+# define project properties
+project(arrow_skyhook)
+cmake_minimum_required(VERSION 3.11)
+set(ARROW_BUILD_STATIC OFF)
+
+# install skyhook headers
+install(FILES client/file_skyhook.h
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/skyhook/client")
+
+# define the targets to build
+add_custom_target(arrow_skyhook_client)
+add_custom_target(cls_skyhook)
+
+# define the dependencies
+find_package(librados REQUIRED)
+include_directories(${LIBRADOS_INCLUDE_DIR})
+set(ARROW_DATASET_LINK_STATIC arrow_dataset_static)
+set(ARROW_DATASET_LINK_SHARED arrow_dataset_shared)
+set(ARROW_DATASET_LINK_STATIC ${ARROW_DATASET_LINK_STATIC}
${LIBRADOS_LIBRARIES})
+set(ARROW_DATASET_LINK_SHARED ${ARROW_DATASET_LINK_SHARED}
${LIBRADOS_LIBRARIES})
Review comment:
Could you use difference prefix such as `ARROW_SKYHOOK_*`?
##########
File path: cpp/src/skyhook/CMakeLists.txt
##########
@@ -0,0 +1,108 @@
+# 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 limitationsn
+# under the License.
+
+#
+# arrow_skyhook
+#
+# define project properties
+project(arrow_skyhook)
+cmake_minimum_required(VERSION 3.11)
+set(ARROW_BUILD_STATIC OFF)
Review comment:
Please don't override options.
--
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]