Skip to content

Commit

Permalink
Update rapids-cmake functions to non-deprecated signatures (#14265)
Browse files Browse the repository at this point in the history
Update to use non deprecated signatures for `rapids_export` functions

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #14265
  • Loading branch information
robertmaynard authored Oct 16, 2023
1 parent d590e0b commit 655f3a4
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 33 deletions.
18 changes: 13 additions & 5 deletions cpp/cmake/thirdparty/get_arrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,19 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
endif()

include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(BUILD Arrow [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
if(ENABLE_PARQUET)
rapids_export_find_package_root(BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
rapids_export_find_package_root(BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
endif()
rapids_export_find_package_root(
BUILD Arrow [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports
)
rapids_export_find_package_root(
BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=]
EXPORT_SET cudf-exports
CONDITION ENABLE_PARQUET
)
rapids_export_find_package_root(
BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=]
EXPORT_SET cudf-exports
CONDITION ENABLE_PARQUET
)

set(ARROW_LIBRARIES
"${ARROW_LIBRARIES}"
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake/thirdparty/get_cufile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function(find_and_configure_cufile)
if(cuFile_FOUND AND NOT BUILD_SHARED_LIBS)
include("${rapids-cmake-dir}/export/find_package_file.cmake")
rapids_export_find_package_file(
BUILD "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" cudf-exports
BUILD "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" EXPORT_SET cudf-exports
)
rapids_export_find_package_file(
INSTALL "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" cudf-exports
INSTALL "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" EXPORT_SET cudf-exports
)
endif()
endfunction()
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake/thirdparty/get_gtest.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2021, NVIDIA CORPORATION.
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
#
# Licensed 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
Expand Down Expand Up @@ -30,7 +30,7 @@ function(find_and_configure_gtest)

include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-testing-exports
BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-testing-exports
)
endif()

Expand Down
12 changes: 7 additions & 5 deletions cpp/cmake/thirdparty/get_kvikio.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
#
# Licensed 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
Expand All @@ -25,10 +25,12 @@ function(find_and_configure_kvikio VERSION)
OPTIONS "KvikIO_BUILD_EXAMPLES OFF"
)

if(KvikIO_BINARY_DIR)
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(BUILD KvikIO "${KvikIO_BINARY_DIR}" cudf-exports)
endif()
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
BUILD KvikIO "${KvikIO_BINARY_DIR}"
EXPORT_SET cudf-exports
CONDITION KvikIO_BINARY_DIR
)

endfunction()

Expand Down
18 changes: 8 additions & 10 deletions cpp/cmake/thirdparty/get_libcudacxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ function(find_and_configure_libcudacxx)
include(${rapids-cmake-dir}/cpm/libcudacxx.cmake)
rapids_cpm_libcudacxx(BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports)

if(libcudacxx_SOURCE_DIR)
# Store where CMake can find our custom Thrust install
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
INSTALL
libcudacxx
[=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/libcudacxx]=]
cudf-exports
)
endif()
# Store where CMake can find our custom Thrust install
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
INSTALL libcudacxx
[=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/libcudacxx]=]
EXPORT_SET cudf-exports
CONDITION libcudacxx_SOURCE_DIR
)
endfunction()

find_and_configure_libcudacxx()
4 changes: 3 additions & 1 deletion cpp/cmake/thirdparty/get_spdlog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function(find_and_configure_spdlog)
NAMESPACE spdlog::
)
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
rapids_export_find_package_root(
BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports
)
endif()
endfunction()

Expand Down
15 changes: 7 additions & 8 deletions cpp/cmake/thirdparty/get_thrust.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ function(find_and_configure_thrust)
INSTALL_EXPORT_SET cudf-exports
)

if(Thrust_SOURCE_DIR)
# Store where CMake can find our custom Thrust install
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
INSTALL Thrust
[=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/thrust]=] cudf-exports
)
endif()
# Store where CMake can find our custom Thrust install
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
INSTALL Thrust [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/thrust]=]
EXPORT_SET cudf-exports
CONDITION Thrust_SOURCE_DIR
)
endfunction()

find_and_configure_thrust()

0 comments on commit 655f3a4

Please sign in to comment.