[stdgpu] add new port (#53264)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
sewon jeon 2026-08-19 10:36:04 +09:00 committed by GitHub
parent b327e4b7d5
commit 06d00ffa49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/stdgpu/CMakeLists.txt b/src/stdgpu/CMakeLists.txt
index 937b60d..3a49dd2 100644
--- a/src/stdgpu/CMakeLists.txt
+++ b/src/stdgpu/CMakeLists.txt
@@ -145,6 +145,8 @@ target_compile_features(stdgpu PUBLIC cxx_std_17)
target_compile_options(stdgpu PRIVATE ${STDGPU_DEVICE_FLAGS}
${STDGPU_HOST_FLAGS})
+target_compile_options(stdgpu PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:preprocessor>)
+
target_compile_definitions(stdgpu PRIVATE $<$<PLATFORM_ID:Windows>:NOMINMAX>)
target_link_libraries(stdgpu PUBLIC thrust::thrust)

View File

@ -0,0 +1,55 @@
# stdgpu's shared build on Windows exports no symbols and does not install its
# DLL, so only static linkage is usable there.
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stotko/stdgpu
# No release newer than 1.3.0 (2020-06); pin the tested master snapshot.
REF 22599cfdcc185c2ed721d78c792e3193cf84cc01
SHA512 de16413c81c7d95e48f2a5fbff018748e629a2316bc6c76c42f881b6922b337a12a1ec20eb732465ff244a04e22afe1846fdbacc9e4f2a72aa0204a0c11d397e
HEAD_REF master
# Current CCCL headers require the conforming MSVC preprocessor.
PATCHES
fix-msvc-preprocessor.patch
)
vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" STDGPU_BUILD_SHARED_LIBS)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSTDGPU_BACKEND=STDGPU_BACKEND_CUDA
-DSTDGPU_BUILD_SHARED_LIBS=${STDGPU_BUILD_SHARED_LIBS}
-DSTDGPU_SETUP_COMPILER_FLAGS=OFF
-DSTDGPU_COMPILE_WARNING_AS_ERROR=OFF
-DSTDGPU_BUILD_EXAMPLES=OFF
-DSTDGPU_BUILD_BENCHMARKS=OFF
-DSTDGPU_BUILD_TESTS=OFF
-DSTDGPU_BUILD_DOCUMENTATION=OFF
-DSTDGPU_ENABLE_CONTRACT_CHECKS=OFF
-DCMAKE_CUDA_COMPILER=${NVCC}
-DCUDAToolkit_ROOT=${CUDA_TOOLKIT_ROOT}
# Consistent with other CUDA ports (ginkgo, colmap); override via
# VCPKG_CMAKE_CONFIGURE_OPTIONS if needed.
-DCMAKE_CUDA_ARCHITECTURES=native
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/stdgpu)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

6
ports/stdgpu/usage Normal file
View File

@ -0,0 +1,6 @@
stdgpu provides CMake targets:
find_package(stdgpu CONFIG REQUIRED)
target_link_libraries(main PRIVATE stdgpu::stdgpu)
This port builds stdgpu with the CUDA backend.

19
ports/stdgpu/vcpkg.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "stdgpu",
"version-date": "2026-07-08",
"description": "Open-source library providing generic GPU data structures for fast and reliable data management",
"homepage": "https://github.com/stotko/stdgpu",
"license": "Apache-2.0",
"supports": "(windows & x64 & !uwp & !xbox) | (linux & x64)",
"dependencies": [
"cuda",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -9812,6 +9812,10 @@
"baseline": "2026-05-25",
"port-version": 0
},
"stdgpu": {
"baseline": "2026-07-08",
"port-version": 0
},
"stduuid": {
"baseline": "1.2.3",
"port-version": 0

9
versions/s-/stdgpu.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "601763dfa5708121970135c199eca4f769644593",
"version-date": "2026-07-08",
"port-version": 0
}
]
}