From b9be197d531cc15aa586b8cdcba0de3e9fd98ba3 Mon Sep 17 00:00:00 2001 From: Laura Promberger Date: Wed, 17 Sep 2025 06:10:22 +0200 Subject: [PATCH] Bump minimum cmake version to 3.16 to enable cmake 4 (#1909) Minimum required cmake version of test/CMakeList.txt is bumped from 2.8 to 3.16. This alignes with the version used in CMakeList.txt and will enable building with cmake 4. [ROCm/rccl commit: 0f6fec15536b61252e5f3f831377506f10e19b85] --- projects/rccl/test/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/rccl/test/CMakeLists.txt b/projects/rccl/test/CMakeLists.txt index c950e418cb..4418b4f648 100644 --- a/projects/rccl/test/CMakeLists.txt +++ b/projects/rccl/test/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All rights reserved. # Modifications Copyright (c) Microsoft Corporation. Licensed under the MIT License. -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.16) if(BUILD_TESTS) @@ -24,7 +24,7 @@ if(BUILD_TESTS) # Search for ROCr header file in user defined locations find_path(ROCR_HDR hsa/hsa.h PATHS ${ROCR_INC_DIR} "/opt/rocm" PATH_SUFFIXES include REQUIRED) - INCLUDE_DIRECTORIES(${ROCR_HDR}) + include_directories(${ROCR_HDR}) # Search for ROCr library file in user defined locations find_library(ROCR_LIB ${CORE_RUNTIME_TARGET} PATHS ${ROCR_LIB_DIR} "/opt/rocm" PATH_SUFFIXES lib lib64 REQUIRED) @@ -129,11 +129,12 @@ if(BUILD_TESTS) # Create rccl-UnitTests binary add_executable(rccl-UnitTests ${TEST_SOURCE_FILES}) - add_dependencies(rccl-UnitTests replace_static_in_hipify) - + # Create rccl-UnitTestsFixtures binary if ROCm version is 4.6.0 or greater # and build type is Debug if (ROCM_VERSION VERSION_GREATER_EQUAL "60400" AND CMAKE_BUILD_TYPE MATCHES "Debug") + add_dependencies(rccl-UnitTests replace_static_in_hipify) + # Add rccl-UnitTestsFixtures binary list(APPEND RCCL_TEST_EXECUTABLES rccl-UnitTestsFixtures)