diff --git a/cpp/src/arrow/gpu/CMakeLists.txt b/cpp/src/arrow/gpu/CMakeLists.txt index 9fc9efa5947..cab085302c6 100644 --- a/cpp/src/arrow/gpu/CMakeLists.txt +++ b/cpp/src/arrow/gpu/CMakeLists.txt @@ -114,6 +114,15 @@ install( FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-gpu.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") +# CUDA build version +configure_file(cuda_version.h.in + "${CMAKE_CURRENT_BINARY_DIR}/cuda_version.h" + @ONLY) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/cuda_version.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/gpu") + set(ARROW_GPU_TEST_LINK_LIBS arrow_gpu_shared ${ARROW_TEST_LINK_LIBS}) diff --git a/cpp/src/arrow/gpu/cuda_api.h b/cpp/src/arrow/gpu/cuda_api.h new file mode 100644 index 00000000000..a70e0af92af --- /dev/null +++ b/cpp/src/arrow/gpu/cuda_api.h @@ -0,0 +1,24 @@ +// 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. + +#ifndef ARROW_GPU_CUDA_API_H +#define ARROW_GPU_CUDA_API_H + +#include "arrow/gpu/cuda_memory.h" +#include "arrow/gpu/cuda_version.h" + +#endif // ARROW_GPU_CUDA_API_H diff --git a/cpp/src/arrow/gpu/cuda_version.h.in b/cpp/src/arrow/gpu/cuda_version.h.in new file mode 100644 index 00000000000..bc687685d0a --- /dev/null +++ b/cpp/src/arrow/gpu/cuda_version.h.in @@ -0,0 +1,25 @@ +// 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. + +#ifndef ARROW_GPU_CUDA_VERSION_H +#define ARROW_GPU_CUDA_VERSION_H + +// Set the CUDA version used to build the library +#define ARROW_CUDA_ABI_VERSION_MAJOR @CUDA_VERSION_MAJOR@ +#define ARROW_CUDA_ABI_VERSION_MINOR @CUDA_VERSION_MINOR@ + +#endif // ARROW_GPU_CUDA_VERSION_H