Use `FetchContent` over CPM as it's bundled with CMake
Thanks @ggerganov for the suggestion
This commit is contained in:
parent
b45d504e70
commit
4fea191c66
|
|
@ -1,25 +0,0 @@
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
|
|
||||||
|
|
||||||
# TODO: Remove this file once CCCL 3.2 is released & bundled with the CUDA Toolkit
|
|
||||||
set(CPM_DOWNLOAD_VERSION 0.42.0)
|
|
||||||
set(CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")
|
|
||||||
|
|
||||||
if(CPM_SOURCE_CACHE)
|
|
||||||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
|
||||||
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
|
||||||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
|
||||||
else()
|
|
||||||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
|
||||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
|
||||||
|
|
||||||
file(DOWNLOAD
|
|
||||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
|
||||||
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
|
|
||||||
)
|
|
||||||
|
|
||||||
include(${CPM_DOWNLOAD_LOCATION})
|
|
||||||
|
|
@ -4,13 +4,16 @@ find_package(CUDAToolkit)
|
||||||
|
|
||||||
# Remove once CCCL 3.2 has been released and bundled with CUDA Toolkit
|
# Remove once CCCL 3.2 has been released and bundled with CUDA Toolkit
|
||||||
if (GGML_CUDA_CUB_3DOT2)
|
if (GGML_CUDA_CUB_3DOT2)
|
||||||
include(../../../cmake/CPM.cmake)
|
include(FetchContent)
|
||||||
# This will automatically clone CCCL from GitHub and make the exported cmake targets available
|
|
||||||
CPMAddPackage(
|
FetchContent_Declare(
|
||||||
NAME CCCL
|
CCCL
|
||||||
GITHUB_REPOSITORY nvidia/cccl
|
GIT_REPOSITORY https://github.com/nvidia/cccl.git
|
||||||
GIT_TAG v3.2.0-rc0 # Fetches the latest commit on the main branch
|
GIT_TAG v3.2.0-rc0
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(CCCL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CUDAToolkit_FOUND)
|
if (CUDAToolkit_FOUND)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue