Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use rapids-cmake 21.10 pre-configured packages #854

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions cmake/thirdparty/get_gtest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,11 @@
# =============================================================================

# Use CPM to find or clone gtest
function(find_and_configure_gtest VERSION)
function(find_and_configure_gtest)

if(TARGET GTest::gtest)
return()
endif()

rapids_cpm_find(
GTest ${VERSION}
GLOBAL_TARGETS gmock gmock_main gtest gtest_main GTest::gmock GTest::gtest GTest::gtest_main
CPM_ARGS
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-${VERSION}
GIT_SHALLOW TRUE
OPTIONS "INSTALL_GTEST OFF"
# googletest >= 1.10.0 provides a cmake config file -- use it if it exists
FIND_PACKAGE_ARGUMENTS
"CONFIG")

if(NOT TARGET GTest::gtest)
add_library(GTest::gmock ALIAS gmock)
add_library(GTest::gmock_main ALIAS gmock_main)
add_library(GTest::gtest ALIAS gtest)
add_library(GTest::gtest_main ALIAS gtest_main)
endif()
include(${rapids-cmake-dir}/cpm/gtest.cmake)
rapids_cpm_gtest()

endfunction()

find_and_configure_gtest(1.10.0)
find_and_configure_gtest()
17 changes: 4 additions & 13 deletions cmake/thirdparty/get_spdlog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,11 @@
# =============================================================================

# Use CPM to find or clone speedlog
function(find_and_configure_spdlog VERSION)
function(find_and_configure_spdlog)

if(TARGET spdlog::spdlog_header_only)
return()
endif()
include(${rapids-cmake-dir}/cpm/spdlog.cmake)
rapids_cpm_spdlog()

rapids_cpm_find(
spdlog ${VERSION}
CPM_ARGS
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v${VERSION}
GIT_SHALLOW TRUE
OPTIONS "SPDLOG_INSTALL TRUE")
# spdlog
if(spdlog_ADDED)
install(TARGETS spdlog_header_only EXPORT rmm-exports)
else()
Expand All @@ -35,4 +26,4 @@ function(find_and_configure_spdlog VERSION)
endif()
endfunction()

find_and_configure_spdlog(1.8.5)
find_and_configure_spdlog()
18 changes: 6 additions & 12 deletions cmake/thirdparty/get_thrust.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,14 @@
# =============================================================================

# Use CPM to find or clone thrust
function(find_and_configure_thrust VERSION)
function(find_and_configure_thrust)

rapids_cpm_find(
Thrust ${VERSION}
include(${rapids-cmake-dir}/cpm/thrust.cmake)
rapids_cpm_thrust(
NAMESPACE rmm
BUILD_EXPORT_SET rmm-exports
INSTALL_EXPORT_SET rmm-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/NVIDIA/thrust.git
GIT_TAG ${VERSION}
GIT_SHALLOW TRUE
OPTIONS "THRUST_INSTALL TRUE")

thrust_create_target(rmm::Thrust FROM_OPTIONS)
INSTALL_EXPORT_SET rmm-exports)

endfunction()

find_and_configure_thrust(1.12.0)
find_and_configure_thrust()