Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions projects/clr/opencl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if(ENABLE_ADDRESS_SANITIZER)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--enable-new-dtags -fuse-ld=lld -fsanitize=address -shared-libasan -g -gz -Wl,--build-id=sha1 -L${ROCM_PATH}/lib/asan")
endif()

set(AMDOCL_INSTALL_LIBDIR ${PROJECT_NAME})
set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
if(BUILD_ICD)
add_subdirectory(khronos/icd)
Expand Down Expand Up @@ -96,11 +97,6 @@ if(DEFINED ENV{ROCM_LIBPATCH_VERSION})
endif()

set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Package Installation path for OpenCL")
#ROCM_PATH is needed to create symlink of libraries
if(NOT DEFINED ROCM_PATH)
string(REPLACE "/opencl" "" ROCM_PATH ${CPACK_PACKAGING_INSTALL_PREFIX})
endif()
message (STATUS "ROCM Installation path(ROCM_PATH): ${ROCM_PATH}")

configure_file(
packaging/amdocl64.icd
Expand Down
4 changes: 2 additions & 2 deletions projects/clr/opencl/amdocl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ target_link_libraries(amdocl PUBLIC rocclr)
INSTALL(TARGETS amdocl
COMPONENT MAIN
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${AMDOCL_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${AMDOCL_INSTALL_LIBDIR})
4 changes: 2 additions & 2 deletions projects/clr/opencl/packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_RPM_COMPONENT_INSTALL ON)

install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary)
install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan)
install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR}/${AMDOCL_INSTALL_LIBDIR} COMPONENT binary)
install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR}/${AMDOCL_INSTALL_LIBDIR} COMPONENT asan)
install(FILES ${opencl_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary)
install(FILES ${opencl_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan COMPONENT asan)

Expand Down
2 changes: 1 addition & 1 deletion projects/clr/opencl/packaging/rocm-ocl-icd.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@

do_ldconfig() {
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@/@AMDOCL_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
}

case "$1" in
Expand Down
4 changes: 2 additions & 2 deletions projects/clr/opencl/packaging/rocm-ocl-icd.rpm_post
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@
INSTALL_PATH=$RPM_INSTALL_PREFIX0

echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@/@AMDOCL_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
2 changes: 1 addition & 1 deletion projects/clr/opencl/packaging/rocm-opencl.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@

do_ldconfig() {
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@/@AMDOCL_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig

}

Expand Down
4 changes: 2 additions & 2 deletions projects/clr/opencl/packaging/rocm-opencl.rpm_post
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@
INSTALL_PATH=$RPM_INSTALL_PREFIX0

echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@/@AMDOCL_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig