Skip to content

Commit

Permalink
Remove system paths from build rpath
Browse files Browse the repository at this point in the history
  • Loading branch information
benson31 committed Jun 17, 2024
1 parent 0edc54f commit f947102
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,24 @@ if (LBANN_HAS_ROCM)
endif ()
message(STATUS "Using LBANN_ROCM_PATH: ${LBANN_ROCM_PATH}")

# The Catch2 tests are only ever build artifacts, so this needs to
# change too.
if (CMAKE_BUILD_RPATH)
# The first of these actually matters; the last 4 are just good
# measure.
list(REMOVE_ITEM CMAKE_BUILD_RPATH
"${LBANN_ROCM_PATH}/lib"
"/usr/lib64"
"/usr/lib"
"/usr/local/lib64"
"/usr/local/lib"
)
# Write the value out to the cache
set(CMAKE_BUILD_RPATH "${CMAKE_BUILD_RPATH}"
CACHE STRING "The build rpath to use"
FORCE)
endif ()

if (CMAKE_INSTALL_RPATH)
# The first of these actually matters; the last 4 are just good
# measure.
Expand Down

0 comments on commit f947102

Please sign in to comment.