Skip to content

Commit

Permalink
Merge pull request lammps#4062 from rbberger/update_hip_detection
Browse files Browse the repository at this point in the history
Remove HIP_PATH requirement from CMake build
  • Loading branch information
akohlmey authored Feb 1, 2024
2 parents 52de76d + a2b7a49 commit 06521d9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions cmake/Modules/DetectHIPInstallation.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
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")
else()
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})

0 comments on commit 06521d9

Please sign in to comment.