Skip to content

Commit

Permalink
Add some logic to clean up the initial CMAKE_INSTALL_RPATH
Browse files Browse the repository at this point in the history
The path auto-generated by Spack may not be ideal.
  • Loading branch information
benson31 committed Jun 17, 2024
1 parent 6f4e6bd commit 0edc54f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,22 @@ if (LBANN_HAS_ROCM)
endif ()
message(STATUS "Using LBANN_ROCM_PATH: ${LBANN_ROCM_PATH}")

if (CMAKE_INSTALL_RPATH)
# The first of these actually matters; the last 4 are just good
# measure.
list(REMOVE_ITEM CMAKE_INSTALL_RPATH
"${LBANN_ROCM_PATH}/lib"
"/usr/lib64"
"/usr/lib"
"/usr/local/lib64"
"/usr/local/lib"
)
# Write the value out to the cache
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}"
CACHE STRING "The install rpath to use"
FORCE)
endif ()

find_package(hip CONFIG REQUIRED)
enable_language(HIP)
find_package(MIOpen CONFIG REQUIRED)
Expand Down Expand Up @@ -1188,7 +1204,3 @@ install(CODE [===[
message(" module load lbann")
message("********************************************************************************")
]===])




0 comments on commit 0edc54f

Please sign in to comment.