From a2b7a49c90c7f23615a9e96d10a94e56bdb0d720 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 26 Jan 2024 15:15:17 -0700 Subject: [PATCH] Remove HIP_PATH requirement from CMake build It is not recommended to set the HIP_PATH environment variable anymore as it may break hipcc in some cases. We only used it for adding the necessary CMAKE_PREFIX_PATH, which after the folder structure reorganization in 5.x was pointing to the same location anyway. Closes issue #3986 --- cmake/Modules/DetectHIPInstallation.cmake | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmake/Modules/DetectHIPInstallation.cmake b/cmake/Modules/DetectHIPInstallation.cmake index 0b425435b68..dfa99047231 100644 --- a/cmake/Modules/DetectHIPInstallation.cmake +++ b/cmake/Modules/DetectHIPInstallation.cmake @@ -1,11 +1,3 @@ -if(NOT DEFINED HIP_PATH) - if(NOT DEFINED ENV{HIP_PATH}) - message(FATAL_ERROR "HIP support requires HIP_PATH to be defined.\n" - "Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.") - else() - set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation") - endif() -endif() if(NOT DEFINED ROCM_PATH) if(NOT DEFINED ENV{ROCM_PATH}) set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation") @@ -13,4 +5,4 @@ if(NOT DEFINED ROCM_PATH) set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation") endif() endif() -list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH}) +list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})