Skip to content

Commit

Permalink
Add RPATH to tests to point to private libraries. (#200)
Browse files Browse the repository at this point in the history
* Add RPATH to tests to point to private libraries.

* Fix relative path to lib

---------

Co-authored-by: Lauren Wrubleski <Lauren.Wrubleski@amd.com>
  • Loading branch information
ahsan-ca and lawruble13 authored Jun 25, 2024
1 parent 9475601 commit dfaa4dd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions share/rocmcmakebuildtools/cmake/ROCMTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,9 @@ function(rocm_install_test)
set(INSTALL_PREFIX "$<TARGET_PROPERTY:tests,ROCM_TEST_INSTALLDIR>")
if(PARSE_TARGETS)
foreach(TARGET ${PARSE_TARGETS})
if(POLICY CMP0095)
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "\${ORIGIN}/../../../lib")
else()
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "\\\${ORIGIN}/../../../lib")
endif()
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../../../lib")
# Adding RPATH to public tests to point to private libraries.
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../../../lib/${PROJECT_NAME}/lib")
endforeach()
install(
TARGETS ${PARSE_TARGETS}
Expand Down

0 comments on commit dfaa4dd

Please sign in to comment.