From 75de9157257af96dea452c0b917406ee656f7db5 Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras <38722728+iassiour@users.noreply.github.com> Date: Sat, 22 Nov 2025 00:31:41 +0000 Subject: [PATCH] hip-tests: fix runpath in hipSquareGenericTargetOnly[Compressed] (#1965) Co-authored-by: Rahul Manocha --- projects/hip-tests/catch/unit/compiler/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/hip-tests/catch/unit/compiler/CMakeLists.txt b/projects/hip-tests/catch/unit/compiler/CMakeLists.txt index b191e10b15..4ccbc45574 100644 --- a/projects/hip-tests/catch/unit/compiler/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/compiler/CMakeLists.txt @@ -30,11 +30,14 @@ if(HIP_PLATFORM MATCHES "amd") set(GENERIC_TARGET_ONLY_COMPRESSED_EXE hipSquareGenericTargetOnlyCompressed) set(LIBFS) + set(HIP_GENERIC_RPATH) if(WIN32) set(GENERIC_TARGET_ONLY_EXE ${GENERIC_TARGET_ONLY_EXE}.exe) set(GENERIC_TARGET_ONLY_COMPRESSED_EXE ${GENERIC_TARGET_ONLY_COMPRESSED_EXE}.exe) else() set(LIBFS -lstdc++fs) + set(HIP_GENERIC_RPATH + -Wl,-rpath,'$$ORIGIN/../lib:${HIP_PATH}/lib') endif() add_custom_target(hipSquareGenericTargetOnly ALL @@ -43,6 +46,7 @@ if(HIP_PLATFORM MATCHES "amd") ${CMAKE_CURRENT_SOURCE_DIR}/../../hipTestMain/hip_test_context.cc ${CMAKE_CURRENT_SOURCE_DIR}/../../hipTestMain/hip_test_features.cc ${CMAKE_CURRENT_SOURCE_DIR}/../../hipTestMain/main.cc + ${HIP_GENERIC_RPATH} -o ${CMAKE_CURRENT_BINARY_DIR}/${GENERIC_TARGET_ONLY_EXE} -I${HIP_PATH}/include/ --hip-path=${HIP_PATH} -I${CMAKE_CURRENT_SOURCE_DIR}/../../include @@ -54,6 +58,7 @@ if(HIP_PLATFORM MATCHES "amd") ${CMAKE_CURRENT_SOURCE_DIR}/../../hipTestMain/hip_test_context.cc ${CMAKE_CURRENT_SOURCE_DIR}/../../hipTestMain/hip_test_features.cc ${CMAKE_CURRENT_SOURCE_DIR}/../../hipTestMain/main.cc + ${HIP_GENERIC_RPATH} -o ${CMAKE_CURRENT_BINARY_DIR}/${GENERIC_TARGET_ONLY_COMPRESSED_EXE} -I${HIP_PATH}/include/ --hip-path=${HIP_PATH} -I${CMAKE_CURRENT_SOURCE_DIR}/../../include