Skip to content

Commit

Permalink
SWDEV-444098 - remove rocm-ocl-icd packaging
Browse files Browse the repository at this point in the history
Change-Id: If0234ff03cf86e1f0435e743c1df75a3e179d48c

Jenifer helped trigger a combined PSDB for the below three changes
https://gerrit-git.amd.com/c/compute/ec/prototype/+/1020194
https://gerrit-git.amd.com/c/compute/ec/clr/+/1003601
https://gerrit-git.amd.com/c/compute/ec/OpenCL-ICD-Loader/+/1012373

Combined PSDB was successful:
http://rocm-ci.amd.com/job/compute-psdb-staging/27382/
Change-Id: If0234ff03cf86e1f0435e743c1df75a3e179d48c
  • Loading branch information
jujiang-del committed Mar 15, 2024
1 parent 96f5c44 commit 5f68a45
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 34 deletions.
19 changes: 5 additions & 14 deletions opencl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
include(GNUInstallDirs)

option(BUILD_TESTS "Enable building OpenCL tests" OFF)
option(BUILD_ICD "Enable building OpenCL ICD Loader" ON)
option(BUILD_ICD "Enable building OpenCL ICD Loader" OFF)
option(EMU_ENV "Enable building for emulation environment" OFF)
option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorganization backward compatibility" OFF)

Expand All @@ -26,6 +26,10 @@ if(MSVC)
endif()

set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "")

###--- Packaging ------------------------------------------------------------###

# DEV package
if(BUILD_ICD)
add_subdirectory(khronos/icd)
else()
Expand All @@ -38,19 +42,6 @@ if(BUILD_TESTS)
add_subdirectory(tests/ocltst)
endif()

###--- Packaging ------------------------------------------------------------###

# DEV package
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL"
DESTINATION include
COMPONENT DEV
PATTERN cl_d3d10.h EXCLUDE
PATTERN cl_d3d11.h EXCLUDE
PATTERN cl_dx9_media_sharing.h EXCLUDE
PATTERN cl_egl.h EXCLUDE
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)

#############################
# Packaging steps
#############################
Expand Down
6 changes: 0 additions & 6 deletions opencl/packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ install(TARGETS amdocl DESTINATION ${CMAKE_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)

install(DIRECTORY ${opencl_SOURCE_DIR}/khronos/headers/opencl2.2/CL
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT dev
USE_SOURCE_PERMISSIONS
PATTERN cl_d3d10.h EXCLUDE
PATTERN cl_d3d11.h EXCLUDE
PATTERN cl_dx9_media_sharing.h EXCLUDE )

if(BUILD_ICD)
install(TARGETS OpenCL DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT icd )
Expand Down
9 changes: 5 additions & 4 deletions opencl/tests/ocltst/env/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ target_include_directories(ocltst
PRIVATE
$<TARGET_PROPERTY:Common,INTERFACE_INCLUDE_DIRECTORIES>)

target_link_libraries(ocltst
PRIVATE
OpenCL
)
target_link_libraries(ocltst PRIVATE OpenCL::OpenCL ${CMAKE_DL_LIBS})

if(NOT WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()

set_target_properties(ocltst PROPERTIES INSTALL_RPATH "$ORIGIN")

Expand Down
4 changes: 1 addition & 3 deletions opencl/tests/ocltst/module/gl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ target_include_directories(oclgl
PRIVATE
$<TARGET_PROPERTY:Common,INTERFACE_INCLUDE_DIRECTORIES>)

target_link_libraries(oclgl
PRIVATE
OpenCL
target_link_libraries(oclgl PRIVATE
${GLEW_LIBRARIES}
${OPENGL_LIBRARIES})

Expand Down
7 changes: 4 additions & 3 deletions opencl/tests/ocltst/module/perf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ target_include_directories(oclperf
PRIVATE
$<TARGET_PROPERTY:Common,INTERFACE_INCLUDE_DIRECTORIES>)

target_link_libraries(oclperf
PRIVATE
OpenCL)
target_link_libraries(oclperf PRIVATE OpenCL::OpenCL ${CMAKE_DL_LIBS})
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()

add_custom_command(
TARGET oclperf POST_BUILD
Expand Down
7 changes: 4 additions & 3 deletions opencl/tests/ocltst/module/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ target_include_directories(oclruntime
PRIVATE
$<TARGET_PROPERTY:Common,INTERFACE_INCLUDE_DIRECTORIES>)

target_link_libraries(oclruntime
PRIVATE
OpenCL)
target_link_libraries(oclruntime PRIVATE OpenCL::OpenCL ${CMAKE_DL_LIBS})
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()

add_custom_command(
TARGET oclruntime POST_BUILD
Expand Down
2 changes: 1 addition & 1 deletion opencl/tools/clinfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target_compile_definitions(clinfo PRIVATE CL_TARGET_OPENCL_VERSION=220 HAVE_CL2_

target_include_directories(clinfo PRIVATE ${OPENCL_ICD_LOADER_HEADERS_DIR})

target_link_libraries(clinfo OpenCL)
target_link_libraries(clinfo OpenCL::OpenCL)

INSTALL(TARGETS clinfo
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 5f68a45

Please sign in to comment.