Commit 7a1a5e9b authored by Ramesh Errabolu's avatar Ramesh Errabolu
Browse files

Add RPATH flag and rename package name

parent b9d3e346
...@@ -104,7 +104,7 @@ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86") ...@@ -104,7 +104,7 @@ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86")
endif() endif()
# Specify name of project to build, install and package # Specify name of project to build, install and package
set(PROJECT_NAME "rocm_bandwidth_test") set(PROJECT_NAME "rocm-bandwidth-test")
set(TEST_NAME "${PROJECT_NAME}") set(TEST_NAME "${PROJECT_NAME}")
project(${PROJECT_NAME}) project(${PROJECT_NAME})
...@@ -196,6 +196,12 @@ target_link_libraries(${TEST_NAME} ${ROC_THUNK_NAME}) ...@@ -196,6 +196,12 @@ target_link_libraries(${TEST_NAME} ${ROC_THUNK_NAME})
target_link_libraries(${TEST_NAME} ${CORE_RUNTIME_TARGET}) target_link_libraries(${TEST_NAME} ${CORE_RUNTIME_TARGET})
target_link_libraries(${TEST_NAME} c stdc++ dl pthread rt) target_link_libraries(${TEST_NAME} c stdc++ dl pthread rt)
# Update linker flags to include RPATH
# Add --enable-new-dtags to generate DT_RUNPATH
if( DEFINED ENV{ROCM_RPATH})
set ( CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags -Wl,--rpath,$ENV{ROCM_RPATH}" )
endif()
# Add install directives for rocm_bandwidth_test # Add install directives for rocm_bandwidth_test
install(TARGETS ${TEST_NAME} RUNTIME DESTINATION bin) install(TARGETS ${TEST_NAME} RUNTIME DESTINATION bin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment