SWDEV-376779 - Fix linking for rdctst
Ieb198ad96e26e89b09cb85986214a5b1451b17a6 broke linking for rdctst and rdcd by removing "../lib/rdc" path. This change adds it back and makes the paths more visible. - Link librdc_ras and librdc_rocp to rdctst - Add longer RUNPATH for rdctst to link rdc libraries Change-Id: Id4f128c217a6de8bb67df6750ecafdb96545811b Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
This commit is contained in:
1 orang tua
2787767bf0
melakukan
fc097d44ff
3 files changed
+46
-6
No files matched your search
@@ -10,6 +10,19 @@ endif()
|
||||
# Required Defines first:
|
||||
option(INSTALL_GTEST "Install GTest (only useful if GTest is not already installed)" OFF)
|
||||
|
||||
# Hack to find libraries after installation
|
||||
# /opt/rocm/share/rdc/rdctst_tests/../../../ = /opt/rocm
|
||||
set(RDCTST_RPATH
|
||||
"\$ORIGIN/../../../lib"
|
||||
"\$ORIGIN/../../../lib/rdc")
|
||||
# replace lib with lib64
|
||||
list(TRANSFORM RDCTST_RPATH REPLACE "lib" "lib64" OUTPUT_VARIABLE RDCTST_RPATH64)
|
||||
# combine lists
|
||||
set(CMAKE_INSTALL_RPATH
|
||||
${CMAKE_INSTALL_RPATH}
|
||||
${RDCTST_RPATH}
|
||||
${RDCTST_RPATH64})
|
||||
|
||||
#
|
||||
# Print out the build configuration being used:
|
||||
#
|
||||
@@ -69,11 +82,12 @@ target_include_directories(
|
||||
PUBLIC ${RSMI_INC_DIR}
|
||||
PUBLIC ${SRC_DIR}/..)
|
||||
|
||||
# TODO: figure out if this properly does runtime linking
|
||||
target_link_libraries(${RDCTST}
|
||||
PUBLIC GTest::gtest_main
|
||||
PUBLIC rdc_bootstrap
|
||||
PUBLIC rdc
|
||||
PUBLIC rdc_ras
|
||||
PUBLIC rdc_rocp
|
||||
PUBLIC c
|
||||
PUBLIC stdc++
|
||||
PUBLIC pthread)
|
||||
|
||||
Reference in new issue
Block a user