From ceb73d91c090882ec69642a78b7d791a1bf220fe Mon Sep 17 00:00:00 2001 From: Vukasin Milovanovic Date: Mon, 15 Jul 2024 12:45:51 -0700 Subject: [PATCH] Make nvcomp adapter compatible with new version macros (#16245) New nvcomp version changed the names of the version macros. This PR adds "aliasing" to the old names so rest of the code is not affected. Authors: - Vukasin Milovanovic (https://github.com/vuule) Approvers: - MithunR (https://github.com/mythrocks) - Muhammad Haseeb (https://github.com/mhaseeb123) URL: https://github.com/rapidsai/cudf/pull/16245 --- cpp/src/io/comp/nvcomp_adapter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpp/src/io/comp/nvcomp_adapter.cpp b/cpp/src/io/comp/nvcomp_adapter.cpp index 0e34c96debd..5d0c6a8c83b 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cpp +++ b/cpp/src/io/comp/nvcomp_adapter.cpp @@ -37,6 +37,13 @@ #include NVCOMP_ZSTD_HEADER #endif +// When building with nvcomp 4.0 or newer, map the new version macros to the old ones +#ifndef NVCOMP_MAJOR_VERSION +#define NVCOMP_MAJOR_VERSION NVCOMP_VER_MAJOR +#define NVCOMP_MINOR_VERSION NVCOMP_VER_MINOR +#define NVCOMP_PATCH_VERSION NVCOMP_VER_PATCH +#endif + #define NVCOMP_HAS_ZSTD_DECOMP(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 3)) #define NVCOMP_HAS_ZSTD_COMP(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 4))