c60d7d860d
This should allow the cmake build for the opencl runtime to work without manually adding these definitions. The PAL build also adds these as private defines in its build, so change rocm to match. This should probably be including these a config header to benefit other builds, but this will at least avoid some clutter in the opencl build for now. Change-Id: I1044984b87ba3fc72e280e255ceea2dd9e3337ff
38 rindas
817 B
CMake
38 rindas
817 B
CMake
add_library(oclrocm OBJECT
|
|
roccounters.cpp
|
|
rocprintf.cpp
|
|
rocprogram.cpp
|
|
rocmemory.cpp
|
|
rocdevice.cpp
|
|
rocblit.cpp
|
|
rockernel.cpp
|
|
rocvirtual.cpp
|
|
rocglinterop.cpp
|
|
rocappprofile.cpp
|
|
rocsettings.cpp
|
|
rocschedcl.cpp
|
|
rochcmessages.cpp
|
|
rochcprintf.cpp
|
|
rochostcall.cpp
|
|
)
|
|
|
|
|
|
target_include_directories(oclrocm
|
|
PUBLIC
|
|
$<TARGET_PROPERTY:amd_comgr,INTERFACE_INCLUDE_DIRECTORIES>
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler/lib/loaders/elf/utils/common
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler/lib/loaders/elf/utils/libelf
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${ROCM_OCL_INCLUDES}
|
|
${ROCR_INCLUDES})
|
|
|
|
|
|
if(${USE_COMGR_LIBRARY} MATCHES "yes")
|
|
target_compile_definitions(oclrocm
|
|
PRIVATE USE_COMGR_LIBRARY)
|
|
endif()
|
|
|
|
set_target_properties(oclrocm PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|