From 2043de5ca30cff99ab2d167470d025632bbefbf7 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 13 Jan 2025 12:00:02 -0500 Subject: [PATCH 1/2] rapids_cpm_cccl uses the proper CCCL version value to compute install rules --- rapids-cmake/cpm/cccl.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/cpm/cccl.cmake b/rapids-cmake/cpm/cccl.cmake index 42b2ae1b..e9d06d27 100644 --- a/rapids-cmake/cpm/cccl.cmake +++ b/rapids-cmake/cpm/cccl.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023-2024, NVIDIA CORPORATION. +# Copyright (c) 2023-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. @@ -103,7 +103,7 @@ function(rapids_cpm_cccl) set_property(GLOBAL PROPERTY rapids_cmake_cccl_install_rules ON) # CCCL < 2.8 does not currently correctly support installation of cub/thrust/libcudacxx in a # subdirectory - if(version VERSION_LESS 2.8) + if(CCCL_VERSION VERSION_LESS 2.8) set(Thrust_SOURCE_DIR "${CCCL_SOURCE_DIR}/thrust") set(CUB_SOURCE_DIR "${CCCL_SOURCE_DIR}/cub") set(libcudacxx_SOURCE_DIR "${CCCL_SOURCE_DIR}/libcudacxx") From 62202ed80160472f4b8e0f97e8b23b85be9dc689 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 13 Jan 2025 14:43:53 -0500 Subject: [PATCH 2/2] Use LIBCUDACXX_VERSION as CCCL_VERSION doesn't always exist --- rapids-cmake/cpm/cccl.cmake | 4 ++-- testing/cpm/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rapids-cmake/cpm/cccl.cmake b/rapids-cmake/cpm/cccl.cmake index e9d06d27..78da54d7 100644 --- a/rapids-cmake/cpm/cccl.cmake +++ b/rapids-cmake/cpm/cccl.cmake @@ -102,8 +102,8 @@ function(rapids_cpm_cccl) set_property(GLOBAL PROPERTY rapids_cmake_cccl_install_rules ON) # CCCL < 2.8 does not currently correctly support installation of cub/thrust/libcudacxx in a - # subdirectory - if(CCCL_VERSION VERSION_LESS 2.8) + # subdirectory CCCL_VERSION doesn't exist when using `add_subdirectory` + if(LIBCUDACXX_VERSION VERSION_LESS 2.8) set(Thrust_SOURCE_DIR "${CCCL_SOURCE_DIR}/thrust") set(CUB_SOURCE_DIR "${CCCL_SOURCE_DIR}/cub") set(libcudacxx_SOURCE_DIR "${CCCL_SOURCE_DIR}/libcudacxx") diff --git a/testing/cpm/CMakeLists.txt b/testing/cpm/CMakeLists.txt index 45c4d435..cf1c3783 100644 --- a/testing/cpm/CMakeLists.txt +++ b/testing/cpm/CMakeLists.txt @@ -82,9 +82,9 @@ add_cmake_build_test( cpm_bs_thread_pool-install-config-works.cmake ) add_cmake_config_test( cpm_cccl-simple.cmake ) add_cmake_config_test( cpm_cccl-export.cmake ) -add_cmake_build_test( cpm_cccl-version-2-5.cmake ) -add_cmake_build_test( cpm_cccl-version-2-7.cmake ) -add_cmake_build_test( cpm_cccl-version-2-8.cmake ) +add_cmake_build_test( cpm_cccl-version-2-5.cmake NO_CPM_CACHE ) +add_cmake_build_test( cpm_cccl-version-2-7.cmake NO_CPM_CACHE ) +add_cmake_build_test( cpm_cccl-version-2-8.cmake NO_CPM_CACHE ) add_cmake_build_test( cpm_cccl-preserve-custom-install-loc ) add_cmake_config_test( cpm_cuco-simple.cmake )