Unverified Commit 8c2ce316 authored by Ramesh Errabolu's avatar Ramesh Errabolu Committed by GitHub
Browse files

Merge pull request #53 from RadeonOpenCompute/useRpath

Add RPATH flag and rename package name
parents b9d3e346 7a1a5e9b
......@@ -104,7 +104,7 @@ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86")
endif()
# 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}")
project(${PROJECT_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} 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
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