From 5da708c043959e6a7d869f8ed15d9d0045f2449a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 2 Dec 2023 10:48:31 -0800 Subject: [PATCH 1/4] Add more global targets --- rapids-cmake/cpm/nvcomp.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/cpm/nvcomp.cmake b/rapids-cmake/cpm/nvcomp.cmake index 4f8c669b..74ab86f8 100644 --- a/rapids-cmake/cpm/nvcomp.cmake +++ b/rapids-cmake/cpm/nvcomp.cmake @@ -91,8 +91,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})") From 951ed115a40c68681fc26d34ddd0f6d486a46a81 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sun, 3 Dec 2023 22:59:15 -0800 Subject: [PATCH 2/4] Add targets to the main find command --- rapids-cmake/cpm/nvcomp.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rapids-cmake/cpm/nvcomp.cmake b/rapids-cmake/cpm/nvcomp.cmake index 74ab86f8..880c3077 100644 --- a/rapids-cmake/cpm/nvcomp.cmake +++ b/rapids-cmake/cpm/nvcomp.cmake @@ -137,7 +137,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 +153,8 @@ function(rapids_cpm_nvcomp) # provide consistent targets between a found nvcomp and one building from source if(NOT TARGET nvcomp::nvcomp AND TARGET nvcomp) add_library(nvcomp::nvcomp ALIAS nvcomp) + add_library(nvcomp::nvcomp_gdeflate ALIAS nvcomp_gdeflate) + add_library(nvcomp::nvcomp_bitcomp ALIAS nvcomp_bitcomp) endif() # Propagate up variables that CPMFindPackage provide From 3aec63dbdee7715ec6c98345e7803cc641fe2215 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sun, 3 Dec 2023 22:59:45 -0800 Subject: [PATCH 3/4] Update docs --- rapids-cmake/cpm/nvcomp.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rapids-cmake/cpm/nvcomp.cmake b/rapids-cmake/cpm/nvcomp.cmake index 880c3077..887c6f87 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 ^^^^^^^^^^^^^^^^ From f7d48b0395a49360291a6134669cd20604d3966f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 4 Dec 2023 10:09:06 -0800 Subject: [PATCH 4/4] Split up targets --- rapids-cmake/cpm/nvcomp.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rapids-cmake/cpm/nvcomp.cmake b/rapids-cmake/cpm/nvcomp.cmake index 887c6f87..e52cb6b2 100644 --- a/rapids-cmake/cpm/nvcomp.cmake +++ b/rapids-cmake/cpm/nvcomp.cmake @@ -155,7 +155,11 @@ function(rapids_cpm_nvcomp) # provide consistent targets between a found nvcomp and one building from source 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()