Change-Id: I59650f7082dd118c1fe92309b76a5bdb20eee3c1


[ROCm/clr commit: 94b203235e]
Этот коммит содержится в:
Payam
2020-04-29 23:33:37 -04:00
родитель e1961eac6b
Коммит 7eda01bab6
3 изменённых файлов: 17 добавлений и 16 удалений
+1 -1
Просмотреть файл
@@ -8,7 +8,7 @@ endif()
project(opencl) project(opencl)
#example command: #example command:
#cmake -DVDI_DIR=/vdi -DUSE_COMGR_LIBRARY=yes -DLIBVDI_STATIC_DIR=/build .. #cmake -DROCclr_DIR=/rocclr -DUSE_COMGR_LIBRARY=yes -DLIBROCclr_STATIC_DIR=/build ..
set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2" CACHE PATH "") set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
set(BUILD_SHARED_LIBS "Build shared libs" ON) set(BUILD_SHARED_LIBS "Build shared libs" ON)
+15 -14
Просмотреть файл
@@ -22,20 +22,21 @@ if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
add_definitions(-DDEBUG) add_definitions(-DDEBUG)
endif() endif()
# FIXME: VDI_DIR and LIBVDI_STATIC_DIR are for compatability with # FIXME: ROCclr_DIR and LIBROCclr_STATIC_DIR are for compatability with
# current build scripts. Instead they should install, or use # current build scripts. Instead they should install, or use
# CMAKE_PREFIX_PATH # CMAKE_PREFIX_PATH
find_package(ROCclr CONFIG #Uncomment once fixed
PATHS #find_package(ROCclr CONFIG
${VDI_DIR} # PATHS
${LIBVDI_STATIC_DIR}) # ${ROCclr_DIR}
# ${LIBROCclr_STATIC_DIR})
if(NOT ROCclr_FOUND) if(NOT ROCclr_FOUND)
# FIXME: Make ROCclr find required and remove this. # FIXME: Make ROCclr find required and remove this.
# #
# This is to break the dependency on patch to start producing find # This is to break the dependency on patch to start producing find
# module. # module.
include(${LIBVDI_STATIC_DIR}/amdvdi_staticTargets.cmake) include(${LIBROCclr_STATIC_DIR}/amdrocclr_staticTargets.cmake)
endif() endif()
include_directories(${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR})
@@ -55,14 +56,14 @@ if(${USE_COMGR_LIBRARY} MATCHES "yes")
include_directories("$<TARGET_PROPERTY:amd_comgr,INTERFACE_INCLUDE_DIRECTORIES>") include_directories("$<TARGET_PROPERTY:amd_comgr,INTERFACE_INCLUDE_DIRECTORIES>")
endif() endif()
include_directories(${VDI_DIR}) include_directories(${ROCclr_DIR})
include_directories(${VDI_DIR}/include) include_directories(${ROCclr_DIR}/include)
include_directories(${VDI_DIR}/compiler/lib) include_directories(${ROCclr_DIR}/compiler/lib)
include_directories(${VDI_DIR}/compiler/lib/include) include_directories(${ROCclr_DIR}/compiler/lib/include)
include_directories(${VDI_DIR}/compiler/lib/backends/common) include_directories(${ROCclr_DIR}/compiler/lib/backends/common)
include_directories(${VDI_DIR}/elf/utils/libelf) include_directories(${ROCclr_DIR}/elf/utils/libelf)
include_directories(${VDI_DIR}/elf/utils/common) include_directories(${ROCclr_DIR}/elf/utils/common)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options("-Wno-ignored-attributes") add_compile_options("-Wno-ignored-attributes")
@@ -107,4 +108,4 @@ add_library(amdocl64 SHARED ${amdocl64_src})
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
target_link_libraries(amdocl64 amdvdi_static Threads::Threads dl) target_link_libraries(amdocl64 amdrocclr_static Threads::Threads dl)
+1 -1
Просмотреть файл
@@ -9,7 +9,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic -Wl,--unresolved-symbols=report-al
include_directories(${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2) include_directories(${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2)
include_directories(${VDI_DIR}/include) include_directories(${ROCclr_DIR}/include)
add_definitions(-DHAVE_CL2_HPP -DCL_TARGET_OPENCL_VERSION=220) add_definitions(-DHAVE_CL2_HPP -DCL_TARGET_OPENCL_VERSION=220)