Skip to content

Commit

Permalink
Add new global targets for rmm (#739)
Browse files Browse the repository at this point in the history
These targets were added in rapidsai/rmm#1722 and must be propagated.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

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

URL: #739
  • Loading branch information
vyasr authored Jan 7, 2025
1 parent ab8cd16 commit 549c677
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 4 additions & 2 deletions rapids-cmake/cpm/rmm.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
# Copyright (c) 2021-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,6 +39,8 @@ for consistency across all RAPIDS projects.
Result Targets
^^^^^^^^^^^^^^
rmm::rmm target will be created
rmm::rmm_logger target will be created
rmm::rmm_logger_impl target will be created
Result Variables
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -73,7 +75,7 @@ function(rapids_cpm_rmm)

include("${rapids-cmake-dir}/cpm/find.cmake")
rapids_cpm_find(rmm ${version} ${ARGN} ${_RAPIDS_UNPARSED_ARGUMENTS}
GLOBAL_TARGETS rmm::rmm
GLOBAL_TARGETS rmm::rmm rmm::rmm_logger rmm::rmm_logger_impl
CPM_ARGS
GIT_REPOSITORY ${repository}
GIT_TAG ${tag}
Expand Down
14 changes: 13 additions & 1 deletion testing/cpm/cpm_rmm-simple.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,22 @@ rapids_cpm_init()
if(TARGET rmm::rmm)
message(FATAL_ERROR "Expected rmm::rmm not to exist")
endif()
if(TARGET rmm::rmm_logger)
message(FATAL_ERROR "Expected rmm::rmm_logger not to exist")
endif()
if(TARGET rmm::rmm_logger_impl)
message(FATAL_ERROR "Expected rmm::rmm_logger_impl not to exist")
endif()

rapids_cpm_rmm()
if(NOT TARGET rmm::rmm)
message(FATAL_ERROR "Expected rmm::rmm target to exist")
endif()
if(NOT TARGET rmm::rmm_logger)
message(FATAL_ERROR "Expected rmm::rmm_logger target to exist")
endif()
if(NOT TARGET rmm::rmm_logger_impl)
message(FATAL_ERROR "Expected rmm::rmm_logger_impl target to exist")
endif()

rapids_cpm_rmm()

0 comments on commit 549c677

Please sign in to comment.