Skip to content

Commit dfaa4dd

Browse files
ahsan-calawruble13
andauthored
Add RPATH to tests to point to private libraries. (ROCm#200)
* Add RPATH to tests to point to private libraries. * Fix relative path to lib --------- Co-authored-by: Lauren Wrubleski <[email protected]>
1 parent 9475601 commit dfaa4dd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

share/rocmcmakebuildtools/cmake/ROCMTest.cmake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,9 @@ function(rocm_install_test)
221221
set(INSTALL_PREFIX "$<TARGET_PROPERTY:tests,ROCM_TEST_INSTALLDIR>")
222222
if(PARSE_TARGETS)
223223
foreach(TARGET ${PARSE_TARGETS})
224-
if(POLICY CMP0095)
225-
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "\${ORIGIN}/../../../lib")
226-
else()
227-
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "\\\${ORIGIN}/../../../lib")
228-
endif()
224+
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../../../lib")
225+
# Adding RPATH to public tests to point to private libraries.
226+
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../../../lib/${PROJECT_NAME}/lib")
229227
endforeach()
230228
install(
231229
TARGETS ${PARSE_TARGETS}

0 commit comments

Comments
 (0)