diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/vtk-m | |
Diffstat (limited to 'vcpkg/ports/vtk-m')
| -rw-r--r-- | vcpkg/ports/vtk-m/fix-macos-15-6.patch | 14 | ||||
| -rw-r--r-- | vcpkg/ports/vtk-m/pkgconfig.diff | 13 | ||||
| -rw-r--r-- | vcpkg/ports/vtk-m/portfile.cmake | 79 | ||||
| -rw-r--r-- | vcpkg/ports/vtk-m/vcpkg.json | 44 |
4 files changed, 150 insertions, 0 deletions
diff --git a/vcpkg/ports/vtk-m/fix-macos-15-6.patch b/vcpkg/ports/vtk-m/fix-macos-15-6.patch new file mode 100644 index 0000000..ecf7fa7 --- /dev/null +++ b/vcpkg/ports/vtk-m/fix-macos-15-6.patch @@ -0,0 +1,14 @@ +diff --git a/CMake/VTKmCompilerFlags.cmake b/CMake/VTKmCompilerFlags.cmake +index 2a7f484..6644468 100644 +--- a/CMake/VTKmCompilerFlags.cmake ++++ b/CMake/VTKmCompilerFlags.cmake +@@ -136,6 +136,9 @@ elseif(VTKM_COMPILER_IS_ICC) + elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG) + set(cxx_flags -Wall -Wcast-align -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused -fno-common -Wno-unused-function) + set(cuda_flags -Xcompiler=-Wall,-Wcast-align,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-fno-common,-Wunused,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-function) ++ if(APPLE) ++ list(APPEND cxx_flags -Wno-missing-template-arg-list-after-template-kw) ++ endif() + + #Clang does not support the -Wchar-subscripts flag for warning if an array + #subscript has a char type. diff --git a/vcpkg/ports/vtk-m/pkgconfig.diff b/vcpkg/ports/vtk-m/pkgconfig.diff new file mode 100644 index 0000000..dc6ec4e --- /dev/null +++ b/vcpkg/ports/vtk-m/pkgconfig.diff @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cfa8524..5b76180 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -420,7 +420,7 @@ install(FILES ${VTKm_BINARY_DIR}/config/vtkm_config.mk + configure_file(${VTKm_SOURCE_DIR}/config/vtkm.pc.in + ${VTKm_BINARY_DIR}/config/vtkm.pc @ONLY) + install(FILES ${VTKm_BINARY_DIR}/config/vtkm.pc +- DESTINATION ${VTKm_INSTALL_SHARE_DIR} ++ DESTINATION ${VTKm_INSTALL_LIB_DIR}/pkgconfig + ) + + include(VTKmInstallCMakePackage) diff --git a/vcpkg/ports/vtk-m/portfile.cmake b/vcpkg/ports/vtk-m/portfile.cmake new file mode 100644 index 0000000..06394c3 --- /dev/null +++ b/vcpkg/ports/vtk-m/portfile.cmake @@ -0,0 +1,79 @@ +# VENDORED DEPENDENCIES!
+# TODO: Should be replaced in the future with VCPKG internal versions
+# add_subdirectory(thirdparty/diy)
+# add_subdirectory(thirdparty/lodepng)
+# if(VTKm_ENABLE_LOGGING)
+ # add_subdirectory(thirdparty/loguru)
+# endif()
+# add_subdirectory(thirdparty/optionparser)
+# add_subdirectory(thirdparty/taotuple)
+# add_subdirectory(thirdparty/lcl)
+
+vcpkg_check_features (OUT_FEATURE_OPTIONS OPTIONS
+ FEATURES
+ cuda VTKm_ENABLE_CUDA
+ omp VTKm_ENABLE_OPENMP
+ tbb VTKm_ENABLE_TBB
+ mpi VTKm_ENABLE_MPI
+ double VTKm_USE_DOUBLE_PRECISION
+ kokkos VTKm_ENABLE_KOKKOS # No port yet
+ )
+
+if("cuda" IN_LIST FEATURES)
+ vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT cuda_toolkit_root)
+ list(APPEND OPTIONS
+ "-DCMAKE_CUDA_COMPILER=${NVCC}"
+ -DCMAKE_CUDA_ARCHITECTURES=all-major # override with VCPKG_CMAKE_CONFIGURE_OPTIONS
+ )
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ message(STATUS "Feature CUDA forces static build!")
+ endif()
+ set(VCPKG_LIBRARY_LINKAGE "static") # CUDA forces static build.
+endif()
+
+# For port customizations on unix systems.
+# Please feel free to make these port features if it makes any sense
+#list(APPEND OPTIONS -DVTKm_ENABLE_GL_CONTEXT=ON) # or
+#list(APPEND OPTIONS -DVTKm_ENABLE_EGL_CONTEXT=ON) # or
+#list(APPEND OPTIONS -DVTKm_ENABLE_OSMESA_CONTEXT=ON)
+
+vcpkg_from_gitlab(GITLAB_URL "https://gitlab.kitware.com"
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO vtk/vtk-m
+ REF v${VERSION}
+ SHA512 eee8245f8ec4a960dfb55e4372fb4c63b6fcafcea33d23cec5f6ac411e531ac3bd2cd830bffeb9b2d44ad94e67bee560952734ab55390cb9a8b690037e380f91
+ PATCHES
+ fix-macos-15-6.patch
+ pkgconfig.diff
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${OPTIONS}
+ -DBUILD_TESTING=OFF
+ -DVTKm_ENABLE_BENCHMARKS=OFF
+ -DVTKm_ENABLE_CPACK=OFF
+ -DVTKm_ENABLE_DEVELOPER_FLAGS=OFF
+ -DVTKm_ENABLE_DOCUMENTATION=OFF
+ -DVTKm_ENABLE_EXAMPLES=OFF
+ -DVTKm_ENABLE_GPU_MPI=OFF
+ -DVTKm_ENABLE_HDF5_IO=OFF
+ -DVTKm_ENABLE_RENDERING=ON
+ -DVTKm_ENABLE_TESTING=OFF
+ -DVTKm_ENABLE_TUTORIALS=OFF
+ -DVTKm_NO_INSTALL_README_LICENSE=ON
+ -DVTKm_USE_64BIT_IDS=ON
+ -DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/vtkm-2.3" PACKAGE_NAME vtkm-2.3)
+vcpkg_fixup_pkgconfig()
+
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/vtkm-2.3/VTKmConfig.cmake" "${CURRENT_BUILDTREES_DIR}" ":not/existing/buildtree:")
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/vtkm-2.3/VTKmConfig.cmake" [[/lib/cmake/vtkm-2.3"]] [[/share/vtkm-2.3"]])
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
diff --git a/vcpkg/ports/vtk-m/vcpkg.json b/vcpkg/ports/vtk-m/vcpkg.json new file mode 100644 index 0000000..9ecdd18 --- /dev/null +++ b/vcpkg/ports/vtk-m/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "vtk-m", + "version": "2.3.0", + "description": "VTK-m is a toolkit of scientific visualization algorithms for emerging processor architectures.", + "homepage": "https://gitlab.kitware.com/vtk/vtk-m/", + "license": null, + "supports": "!x86 & !uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "cuda": { + "description": "Use the NVIDIA CUDA device adapter.", + "dependencies": [ + "cuda" + ] + }, + "double": { + "description": "Use double precision in floating point calculations" + }, + "mpi": { + "description": "Use the MPI controller.", + "dependencies": [ + "mpi" + ] + }, + "omp": { + "description": "Use the OpenMP device adapter." + }, + "tbb": { + "description": "Use the Intel TBB device adapter.", + "dependencies": [ + "tbb" + ] + } + } +} |