Skip to content

Commit

Permalink
[cmake] add library dependencies to hip_hcc libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
scchan committed Jan 5, 2017
1 parent a42da10 commit 4fd4808
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,11 @@ if(HIP_PLATFORM STREQUAL "hcc")
src/hip_fp16.cpp
src/device_functions.cpp)

set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${HCC_HOME}/lib -lmcwamp -Wl,-Bsymbolic")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${HCC_HOME}/lib -lmcwamp -Wl,-Bsymbolic -Wl,-rpath ${HCC_HOME}/lib")
add_library(hip_hcc SHARED ${SOURCE_FILES_RUNTIME})
target_link_libraries(hip_hcc c++ c++abi hc_am)
add_library(hip_hcc_static STATIC ${SOURCE_FILES_RUNTIME})
target_link_libraries(hip_hcc_static c++ c++abi hc_am)
add_dependencies(hip_hcc_static hip_hcc)
add_library(hip_device STATIC ${SOURCE_FILES_DEVICE})
add_dependencies(hip_device hip_hcc)
Expand Down

0 comments on commit 4fd4808

Please sign in to comment.