Skip to content

Commit

Permalink
Add missing nvcomp targets (#496)
Browse files Browse the repository at this point in the history
The list of targets marked as global when finding nvcomp is incomplete and should include the gdeflate and bitcomp libs as well.

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

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

URL: #496
  • Loading branch information
vyasr authored Dec 4, 2023
1 parent 28a3062 commit 0936f2a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions rapids-cmake/cpm/nvcomp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ across all RAPIDS projects.
Result Targets
^^^^^^^^^^^^^^
nvcomp::nvcomp target will be created
nvcomp::nvcomp_gdeflate target will be created
nvcomp::nvcomp_bitcomp target will be created
Result Variables
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -91,8 +93,9 @@ function(rapids_cpm_nvcomp)
# first search locally if `rapids_cmake_always_download` is false
if(NOT rapids_cmake_always_download)
include("${rapids-cmake-dir}/find/package.cmake")
rapids_find_package(nvcomp ${version} GLOBAL_TARGETS nvcomp::nvcomp ${_RAPIDS_EXPORT_ARGUMENTS}
FIND_ARGS QUIET)
rapids_find_package(nvcomp ${version}
GLOBAL_TARGETS nvcomp::nvcomp nvcomp::nvcomp_gdeflate nvcomp::nvcomp_bitcomp
${_RAPIDS_EXPORT_ARGUMENTS} FIND_ARGS QUIET)
if(nvcomp_FOUND)
# report where nvcomp was found
message(STATUS "Found nvcomp: ${nvcomp_DIR} (found version ${nvcomp_VERSION})")
Expand Down Expand Up @@ -136,7 +139,7 @@ function(rapids_cpm_nvcomp)

include("${rapids-cmake-dir}/cpm/find.cmake")
rapids_cpm_find(nvcomp ${version} ${_RAPIDS_UNPARSED_ARGUMENTS}
GLOBAL_TARGETS nvcomp::nvcomp
GLOBAL_TARGETS nvcomp::nvcomp nvcomp::nvcomp_gdeflate nvcomp::nvcomp_bitcomp
CPM_ARGS
GIT_REPOSITORY ${repository}
GIT_TAG ${tag}
Expand All @@ -153,6 +156,12 @@ function(rapids_cpm_nvcomp)
if(NOT TARGET nvcomp::nvcomp AND TARGET nvcomp)
add_library(nvcomp::nvcomp ALIAS nvcomp)
endif()
if(NOT TARGET nvcomp::nvcomp_gdeflate AND TARGET nvcomp_gdeflate)
add_library(nvcomp::nvcomp_gdeflate ALIAS nvcomp_gdeflate)
endif()
if(NOT TARGET nvcomp::nvcomp_bitcomp AND TARGET nvcomp_bitcomp)
add_library(nvcomp::nvcomp_bitcomp ALIAS nvcomp_bitcomp)
endif()

# Propagate up variables that CPMFindPackage provide
set(nvcomp_SOURCE_DIR "${nvcomp_SOURCE_DIR}" PARENT_SCOPE)
Expand Down

0 comments on commit 0936f2a

Please sign in to comment.