P4 to Git Change 1971654 by kzhuravl@kzhuravl-spot-ocl on 2019/07/22 17:15:57

SWDEV-79445 - Bring cmake related changes from git

	http://git.amd.com:8080/c/compute/ec/opencl/+/229473
	http://git.amd.com:8080/c/compute/ec/opencl/+/229474
	http://git.amd.com:8080/c/compute/ec/opencl/+/233268

	+

	Payam's changes for comgr

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#24 edit
... //depot/stg/opencl/drivers/opencl/DEB/postinst#1 add
... //depot/stg/opencl/drivers/opencl/DEB/prerm#1 add
... //depot/stg/opencl/drivers/opencl/RPM/rpm_post#1 add
... //depot/stg/opencl/drivers/opencl/RPM/rpm_postun#1 add
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#18 edit
... //depot/stg/opencl/drivers/opencl/cmake/modules/FindROCR.cmake#3 edit
... //depot/stg/opencl/drivers/opencl/cmake/modules/FindROCT.cmake#1 add
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#20 edit
This commit is contained in:
foreman
2019-07-22 17:19:35 -04:00
parent 615e8b4809
commit b21a094a92
5 changed files with 56 additions and 77 deletions
+9 -1
View File
@@ -7,7 +7,7 @@ if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
add_definitions(-DDEBUG)
endif()
include_directories(${ROCR_INCLUDE_DIRS})
include_directories(${ROCR_INCLUDES})
include_directories(${CMAKE_SOURCE_DIR}/runtime)
include_directories(${CMAKE_SOURCE_DIR}/api/opencl)
@@ -29,6 +29,13 @@ include_directories(${CMAKE_SOURCE_DIR}/compiler/lib/loaders/elf/utils/libelf)
add_subdirectory(device/rocm)
if(${USE_COMGR_LIBRARY} MATCHES "yes")
add_definitions(-DUSE_COMGR_LIBRARY -DCOMGR_DYN_DLL)
find_package(amd_comgr REQUIRED CONFIG)
include_directories("$<TARGET_PROPERTY:amd_comgr,INTERFACE_INCLUDE_DIRECTORIES>")
set(COMGR_CPP device/comgrctx.cpp)
endif()
add_library(oclruntime OBJECT
thread/thread.cpp
thread/monitor.cpp
@@ -61,6 +68,7 @@ add_library(oclruntime OBJECT
${CMAKE_SOURCE_DIR}/compiler/lib/loaders/elf/elf.cpp
${CMAKE_SOURCE_DIR}/compiler/lib/loaders/elf/elf_utils.cpp
${CMAKE_SOURCE_DIR}/compiler/tools/caching/cache.cpp
${COMGR_CPP}
)
set_target_properties(oclruntime PROPERTIES POSITION_INDEPENDENT_CODE ON)
@@ -7,6 +7,12 @@ include_directories(${CMAKE_SOURCE_DIR}/compiler/lib/loaders/elf/utils/libelf)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${ROCM_OCL_INCLUDES})
if(${USE_COMGR_LIBRARY} MATCHES "yes")
add_definitions(-DUSE_COMGR_LIBRARY -DCOMGR_DYN_DLL)
find_package(amd_comgr REQUIRED CONFIG)
include_directories("$<TARGET_PROPERTY:amd_comgr,INTERFACE_INCLUDE_DIRECTORIES>")
endif()
add_library(oclrocm OBJECT
roccounters.cpp
rocprintf.cpp