zeroshade commented on code in PR #356: URL: https://github.com/apache/arrow-adbc/pull/356#discussion_r1083335613
########## c/cmake_modules/GoUtils.cmake: ########## @@ -0,0 +1,210 @@ +# 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_program(GO_BIN "go" REQUIRED) +message(STATUS "Detecting Go executable: Found ${GO_BIN}") + +function(install_cmake_package PACKAGE_NAME EXPORT_NAME) + set(CONFIG_CMAKE "${PACKAGE_NAME}Config.cmake") + set(BUILT_CONFIG_CMAKE "${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_CMAKE}") + configure_package_config_file("${CONFIG_CMAKE}.in" "${BUILT_CONFIG_CMAKE}" + INSTALL_DESTINATION "${ARROW_CMAKE_DIR}/${PACKAGE_NAME}") + set(CONFIG_VERSION_CMAKE "${PACKAGE_NAME}ConfigVersion.cmake") + set(BUILT_CONFIG_VERSION_CMAKE "${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_VERSION_CMAKE}") + write_basic_package_version_file("${BUILT_CONFIG_VERSION_CMAKE}" + COMPATIBILITY SameMajorVersion) + set(INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}") + install(FILES "${BUILT_CONFIG_CMAKE}" "${BUILT_CONFIG_VERSION_CMAKE}" + DESTINATION "${INSTALL_CMAKEDIR}") + set(TARGETS_CMAKE "${PACKAGE_NAME}Targets.cmake") + install(EXPORT ${EXPORT_NAME} + DESTINATION "${INSTALL_CMAKEDIR}" + NAMESPACE "${PACKAGE_NAME}::" + FILE "${TARGETS_CMAKE}" + EXPORT_LINK_INTERFACE_LIBRARIES) +endfunction() Review Comment: I plan on trying to get it working properly to create the cmake file for install, but you're right. We can remove this for now and address it in a future PR -- 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]
