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/nccl/portfile.cmake | |
Diffstat (limited to 'vcpkg/ports/nccl/portfile.cmake')
| -rw-r--r-- | vcpkg/ports/nccl/portfile.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vcpkg/ports/nccl/portfile.cmake b/vcpkg/ports/nccl/portfile.cmake new file mode 100644 index 0000000..5909c49 --- /dev/null +++ b/vcpkg/ports/nccl/portfile.cmake @@ -0,0 +1,20 @@ + +# Find NCCL. We can use FindNCCL directly since it doesn't call any functions +# that are disallowed in CMake script mode +set(MINIMUM_NCCL_VERSION "2.4.6.1") +set(NCCL_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +find_package(NCCL ${MINIMUM_NCCL_VERSION}) +set(CMAKE_MODULE_PATH ${NCCL_PREV_MODULE_PATH}) + +# Download or return +if(NCCL_FOUND) + message(STATUS "Using NCCL ${_NCCL_VERSION} located on system.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + message(FATAL_ERROR "Please install NCCL using your system package manager (the same way you installed CUDA). For example: apt install libnccl2 libnccl-dev.") +endif() + +file(INSTALL "${CURRENT_PORT_DIR}/FindNCCL.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +configure_file("${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) |