mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 14:19:00 +08:00
ac9da2cd77
* [nccl] Only download if compatible with found CUDA version * add-version * Remove auto-download * Remove windows branch * Ran x-add-version --overwrite-version * Add hardcoded find hints in /usr * Fix version. Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
20 lines
840 B
CMake
20 lines
840 B
CMake
vcpkg_fail_port_install(ON_TARGET "Windows" "OSX" ON_ARCH "x86" "arm")
|
|
|
|
# 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}/usage" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|