From 0936f2aaf7a671c661f7d47657ec4e80fee2a307 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 4 Dec 2023 11:18:27 -0800 Subject: [PATCH] Add missing nvcomp targets (#496) 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: https://github.com/rapidsai/rapids-cmake/pull/496 --- rapids-cmake/cpm/nvcomp.cmake | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/rapids-cmake/cpm/nvcomp.cmake b/rapids-cmake/cpm/nvcomp.cmake index 4f8c669b..e52cb6b2 100644 --- a/rapids-cmake/cpm/nvcomp.cmake +++ b/rapids-cmake/cpm/nvcomp.cmake @@ -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 ^^^^^^^^^^^^^^^^ @@ -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})") @@ -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} @@ -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)