Files
lammps/cmake/Modules/DetectHIPInstallation.cmake
Richard Berger a2b7a49c90 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
2024-01-26 15:19:41 -07:00

9 lines
288 B
CMake

if(NOT DEFINED ROCM_PATH)
if(NOT DEFINED ENV{ROCM_PATH})
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
else()
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
endif()
endif()
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})