mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:28:00 +08:00
[cuda-api-wrappers] new port (#35376)
This commit is contained in:
parent
c0edfbe543
commit
607aac2203
38
ports/cuda-api-wrappers/portfile.cmake
Normal file
38
ports/cuda-api-wrappers/portfile.cmake
Normal 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()
|
4
ports/cuda-api-wrappers/usage
Normal file
4
ports/cuda-api-wrappers/usage
Normal 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)
|
17
ports/cuda-api-wrappers/vcpkg.json
Normal file
17
ports/cuda-api-wrappers/vcpkg.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
@ -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
|
||||
|
9
versions/c-/cuda-api-wrappers.json
Normal file
9
versions/c-/cuda-api-wrappers.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f31ca06768d00b72f8387dce98f3a8d2d867cfcb",
|
||||
"version": "0.6.6",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user