[cuda-api-wrappers] new port (#35376)

This commit is contained in:
sewon jeon 2023-12-05 10:13:07 +09:00 committed by GitHub
parent c0edfbe543
commit 607aac2203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,38 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO eyalroz/cuda-api-wrappers
REF "v${VERSION}"
SHA512 4bc095513ed1a40f7239810abf7f6edcfde5471a89de8cf27a76038f6a54f6234542693bb606cc5e389403f3d12cb186b5a9cfb31c2bf3e437c112d215fb872d
HEAD_REF master
)
# head only library
set(VCPKG_BUILD_TYPE release)
# cuda toolkit check
vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT)
message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}")
# nvcc compiler path
set(CMAKE_CUDA_COMPILER "${CUDA_TOOLKIT_ROOT}/bin/nvcc${VCPKG_HOST_EXECUTABLE_SUFFIX}")
set(CUDA_ARCHITECTURES "native")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCAW_BUILD_EXAMPLES=OFF
"-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES}"
"-DCMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
vcpkg_fixup_pkgconfig()

View File

@ -0,0 +1,4 @@
cuda-api-wrappers provides CMake targets:
find_package(cuda-api-wrappers CONFIG REQUIRED)
target_link_libraries(main PRIVATE cuda-api-wrappers::rtc cuda-api-wrappers::nvtx cuda-api-wrappers::runtime-and-driver)

View File

@ -0,0 +1,17 @@
{
"name": "cuda-api-wrappers",
"version": "0.6.6",
"description": "header-only library of integrated wrappers around the core parts of NVIDIA's CUDA execution ecosystem",
"license": "BSD-3-Clause",
"dependencies": [
"cuda",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -2024,6 +2024,10 @@
"baseline": "10.1",
"port-version": 13
},
"cuda-api-wrappers" : {
"baseline": "0.6.6",
"port-version": 0
},
"cudnn": {
"baseline": "7.6.5",
"port-version": 10

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f31ca06768d00b72f8387dce98f3a8d2d867cfcb",
"version": "0.6.6",
"port-version": 0
}
]
}