From bd30ea0dae47ae52638041a840c09e2cdfff6874 Mon Sep 17 00:00:00 2001 From: Stanley Tsang Date: Sat, 6 Nov 2021 07:58:26 -0700 Subject: [PATCH] Fixing cmake_install_prefix search to include /opt/rocm-xxxx (#462) [ROCm/rccl commit: 2f87073514ba29d6c6115100f84b2c3ff5b9cde0] --- projects/rccl/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rccl/test/CMakeLists.txt b/projects/rccl/test/CMakeLists.txt index 07498b225d..9b00ddbdcb 100644 --- a/projects/rccl/test/CMakeLists.txt +++ b/projects/rccl/test/CMakeLists.txt @@ -81,7 +81,7 @@ if(BUILD_TESTS) # HIPCC adds /opt/rocm/lib as RPATH, even though the install process is supposed to # remove RPATH. It also occurs before any user-specified rpath, which effectively overrides the user rpath. # As a work-around, set the correct RPATH for the unit test executable as a post-install step - if (CMAKE_INSTALL_PREFIX STREQUAL "/opt/rocm") + if (CMAKE_INSTALL_PREFIX MATCHES "/opt/rocm*") # install_prefix/CMAKE_INSTALL_PREFIX was not explicitly specified, so look in build/release add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r ${CMAKE_BINARY_DIR}:/opt/rocm/lib ${CMAKE_BINARY_DIR}/test/UnitTests) add_custom_command( TARGET UnitTestsMultiProcess POST_BUILD COMMAND chrpath ARGS -r ${CMAKE_BINARY_DIR}:/opt/rocm/lib ${CMAKE_BINARY_DIR}/test/UnitTestsMultiProcess)