Files
nccl-tests/os/CMakeLists.txt
Unmesh Deodhar 2c52b4e910 Add Windows support for nccl tests
Add a portable OS abstraction and CMake build entry points so the tests can build on Windows with MSVC and CUDA.

Update the perf and verifiable sources to avoid POSIX-only APIs and compiler extensions where needed.

Signed-off-by: Unmesh Deodhar <[email protected]>
2026-06-25 10:17:21 -05:00

25 lines
538 B
CMake

#
# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.
#
# See LICENSE.txt for license information
#
# OS abstraction layer for NCCL tests.
if(NCCL_OS_LINUX)
set(OS_SOURCES linux.cc)
elseif(NCCL_OS_WINDOWS)
set(OS_SOURCES windows.cc)
else()
message(FATAL_ERROR "Unsupported OS for nccl-tests: ${CMAKE_SYSTEM_NAME}")
endif()
add_library(nccl_test_os STATIC ${OS_SOURCES})
target_include_directories(nccl_test_os
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries(nccl_test_os PRIVATE nccl_tests_options)