WillAyd commented on code in PR #2186: URL: https://github.com/apache/arrow-adbc/pull/2186#discussion_r1805284814
########## docs/source/cpp/recipe_driver/CMakeLists.txt: ########## @@ -0,0 +1,76 @@ +# 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. + +cmake_minimum_required(VERSION 3.18) + +project(adbc_cookbook_recipes_driver + VERSION "1.0.0" + LANGUAGES CXX) + +include(CTest) +include(FetchContent) + +set(CMAKE_CXX_STANDARD 17) + +# TODO: This currently depends on about-to-be-released nanoarrow, which allows +# access to both nanoarrow and the IPC reader using a single fetchcontent. +set(NANOARROW_IPC ON) +set(NANOARROW_NAMESPACE "DriverExamplePrivate") +fetchcontent_declare(nanoarrow + GIT_REPOSITORY https://github.com/apache/arrow-nanoarrow.git + GIT_TAG main + GIT_SHALLOW TRUE) +fetchcontent_makeavailable(nanoarrow) + +# TODO: We could allow this to be installed + linked to as a target; however, +# fetchcontent is a little nicer for this kind of thing (statically linked +# pinned version of something that doesn't rely on a system libraray). +add_library(adbc_driver_framework ../../../../c/driver/framework/utility.cc + ../../../../c/driver/framework/objects.cc) +target_include_directories(adbc_driver_framework PRIVATE ../../../../c + ../../../../c/include) +target_link_libraries(adbc_driver_framework PRIVATE nanoarrow::nanoarrow) + +# TODO: Do we want any symbol visiblity presets here to ensure that the only one exposed Review Comment: This would be nice but we don't have this worked out in the main project yet either do we? Maybe worth punting until then ########## docs/source/cpp/recipe_driver/CMakeLists.txt: ########## @@ -0,0 +1,76 @@ +# 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. + +cmake_minimum_required(VERSION 3.18) + +project(adbc_cookbook_recipes_driver + VERSION "1.0.0" + LANGUAGES CXX) + +include(CTest) +include(FetchContent) + +set(CMAKE_CXX_STANDARD 17) + +# TODO: This currently depends on about-to-be-released nanoarrow, which allows +# access to both nanoarrow and the IPC reader using a single fetchcontent. +set(NANOARROW_IPC ON) +set(NANOARROW_NAMESPACE "DriverExamplePrivate") +fetchcontent_declare(nanoarrow + GIT_REPOSITORY https://github.com/apache/arrow-nanoarrow.git + GIT_TAG main + GIT_SHALLOW TRUE) +fetchcontent_makeavailable(nanoarrow) + +# TODO: We could allow this to be installed + linked to as a target; however, +# fetchcontent is a little nicer for this kind of thing (statically linked +# pinned version of something that doesn't rely on a system libraray). +add_library(adbc_driver_framework ../../../../c/driver/framework/utility.cc + ../../../../c/driver/framework/objects.cc) +target_include_directories(adbc_driver_framework PRIVATE ../../../../c + ../../../../c/include) +target_link_libraries(adbc_driver_framework PRIVATE nanoarrow::nanoarrow) + +# TODO: Do we want any symbol visiblity presets here to ensure that the only one exposed +# is the init function? +add_library(driver_example SHARED driver_example.cc) +target_include_directories(driver_example PRIVATE ../../../../c ../../../../c/include) +target_link_libraries(driver_example PRIVATE adbc_driver_framework + nanoarrow::nanoarrow_ipc) + +# TODO: Do we want to have this as part of the example? We could make the validation library Review Comment: I am +1 to including this in the example - I think the test is helpful to read -- 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]
