Switched from cmake_host_system_information feature to a manual parse (#1518)

* Switched cmake_host_system_information feature to a manual parse to remain cmake 3.5 compliant.

* Updating minimum cmake to 3.16 to conform with the rest of ROCm. This change still applies.
Bu işleme şunda yer alıyor:
corey-derochie-amd
2025-02-11 08:51:39 -07:00
işlemeyi yapan: GitHub
ebeveyn 4e406acc43
işleme 42ab425037
+7 -2
Dosyayı Görüntüle
@@ -3,7 +3,7 @@
# CMake version minimum requirements
#==================================================================================================
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
# CMake Toolchain file to define compilers and path to ROCm
#==================================================================================================
@@ -315,7 +315,12 @@ if (ENABLE_MSCCLPP AND ROCM_VERSION VERSION_LESS "60200")
set(ENABLE_MSCCLPP OFF)
message(WARNING "MSCCL++ integration only supported on ROCm 6.2 or greater; disabling MSCCL++ build")
endif()
cmake_host_system_information(RESULT HOST_OS_ID QUERY DISTRIB_ID)
# cmake_host_system_information(RESULT HOST_OS_ID QUERY DISTRIB_ID) ## Requires cmake 3.22
execute_process(
COMMAND bash -c "grep '^ID=' /etc/os-release | cut -d'=' -f2"
OUTPUT_VARIABLE HOST_OS_ID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (ENABLE_MSCCLPP AND NOT(${HOST_OS_ID} STREQUAL "ubuntu" OR ${HOST_OS_ID} STREQUAL "centos"))
set(ENABLE_MSCCLPP OFF)
message(WARNING "MSCCL++ integration not supported on this OS (${HOST_OS_ID}); disabling MSCCL++ build")